Pass/Fail Test Step

TestStand 2019 Help

Edition Date: May 2019

Part Number: 370052AA-01

»View Product Info
Download Help (Windows Only)

The Pass/Fail Test step calls a code module that makes its own pass/fail determination.

After the code module executes, the Pass/Fail Test step type evaluates the Step.Result.PassFail property. If Step.Result.PassFail is True, the step type sets the step status to Passed. If Step.Result.PassFail is False, the step type sets the step status to Failed.

Configuring the Step

Use the Data Source edit tab in the TestStand Sequence Editor and the Edit Pass/Fail Source dialog box in a TestStand User Interface to specify the data source for the Boolean value the Pass/Fail Test step uses to determine whether the step passes.

A code module can set the value of Step.Result.PassFail in the following ways:

  • LabVIEW Adapter—Specify Step.Result.PassFail as the Value expression for a Boolean output of a VI on the LabVIEW Module tab.
  • LabWindows/CVI, C/C++ DLL, .NET, ActiveX/COM, or Sequence Adapter—Pass Step.Result.PassFail as a reference parameter to a subsequence or code module.
  • LabVIEW or LabWindows/CVI Adapter—The LabVIEW and LabWindows/CVI Adapters update the value of Step.Result.PassFail automatically after calling legacy code modules. The LabVIEW Adapter updates the value of Step.Result.PassFail based on the value of the Pass/Fail Flag element of the Test Data cluster the VI returns. The LabWindows/CVI Adapter updates the value of Step.Result.PassFail based on the value of the result field of the tTestData parameter it passes to the C function.
  • All Adapters—Use the TestStand API to set the value of Step.Result.PassFail directly in a code module.

By default, the step type uses the value of the Step.Result.PassFail Boolean property to determine whether the step passes or fails. To customize the Boolean expression that determines whether the step passes, select Edit Data Source from the context menu for the step or click the Data Source tab of the Step Settings pane.

Step Properties

In addition to the common custom properties, the Pass/Fail Test step type defines the following step properties:

  • Step.Result.PassFail—The Boolean pass/fail flag. Pass is True. Fail is False. Usually, you set this value in the code module or with a custom pass/fail source expression.
  • Step.InBuf—An arbitrary string the LabVIEW and LabWindows/CVI Adapters pass to the test in the Input Buffer control or tTestData structure of legacy code modules. This property exists to maintain compatibility with previous test executives. Usually, code modules you develop for TestStand receive data as input parameters or access data as properties using the TestStand API.
  • Step.DataSource—The Boolean expression the step uses to set the value of Step.Result.PassFail. The default value of the expression is "Step.Result.PassFail", which has the effect of using the value the code module sets. You can customize this expression when you do not want to set the value of Step.Result.PassFail in the code module. For example, you can set the data source expression to refer to multiple variables and properties, such as RunState.PreviousStep.Result.Numeric * Locals.Attenuation > 12.

See Also

Calling Legacy LabVIEW Code Modules

Calling Legacy LabWindows/CVI Code Modules

Step Types You Can Use with Any Module Adapter


Not Helpful