Purpose

This example simulates the testing of a computer motherboard using test steps that use the Python Adapter.

Example File Location

<TestStand Public>\Examples\Demos\Computer Motherboard Test\Python\Computer Motherboard Test Sequence.seq

Highlighted Features

  • Flow Control step types
  • Preconditions
  • Post Actions
  • Sequence Call steps
  • Test step types

Major API

None

Prerequisites

You must have the required version of CPython interpreter installed and added to your PATH variable. You must update the Python version to use in the Python Adapter Configuration dialog box before using the example.

How to Use This Example

Complete the following steps to use this example.

  1. On the Steps pane of the MainSequence sequence, review the steps in the Setup step group.
    • The Simulation Dialog step calls a CVI DLL that launches a dialog box to prompt you to select a test or tests you want to simulate to fail.
    • The Initialize Computer Test step, which is an Action step, creates an instance of a Python class that stores the settings the user specifies in the simulation dialog. TestStand uses the instance of the class to call class functions which do the testing.
    • The Turn Vacuum Table On step, which is an Action step, simulates the activation of a vacuum table. In the Cleanup step group, the Turn Vacuum Table Off step deactivates the vacuum table.
  2. On the Steps pane, review the steps in the Main step group.
    • The Powerup Test step, which is a Pass/Fail Test step, simulates a power-up test, and the results of the step determine whether the following If/Else structure continues testing or executes the Powerup Diagnostics step.
    • The CPU Test step, which is a Sequence Call step, calls the CPU Test subsequence to simulate CPU tests.
    • The ROM Test, RAM Test, Video Test, and Keyboard Test steps simulate tests, and if any test fails, the following If structure executes.
    • Each step in the If structure specifies a precondition expression that executes the step only when the corresponding test step fails.
  3. Select Execute»Single Pass to run the sequence.
  4. In the Test Simulator dialog box, select the Power On test to fail.
  5. When execution completes, review the report on the Report pane. The report indicates that the test steps after the Powerup Test step did not execute, but the Powerup Diagnostics step did execute.
  6. Select Execute»Restart to run the sequence again.
  7. In the Test Simulator dialog box, select any test other than the Power On test to fail.
  8. When execution completes, review the report. The report indicates that the Powerup Test step passes and TestStand ran the remaining tests, and that TestStand ran diagnostic steps for any failed test steps but skipped diagnostic steps for any passed test steps.