Manually Setting Error Status for Test Steps in TestStand™

Updated Jul 31, 2026

Reported In

Software

  • TestStand

Issue Details

I am using test steps in TestStand and would like them to return an Error status instead of a Passed or Failed result. However, I am not able to modify the Status Expression of these steps. How can I achieve this behavior? 

Solution

Test steps in TestStand (such as Numeric Limit Test steps, for example) cannot be configured to return an Error status, because their Status Expression is defined by the step type and is not editable.

 

To achieve the desired behavior, you can replace the Numeric Limit Test with an Action step that calls a code module and performs the comparison within that module. This approach allows you to control how the result is interpreted and reported:

 

  1. Implement the comparison logic inside a code module such as LabVIEW, C#, or Python.
  2. Add an Action step to your sequence and configure it to call the code module. In the Module tab, map the inputs and outputs used for the comparison.
  3. Define an output parameter in the code module (for example, a Boolean such as WithinLimits) that indicates whether the comparison meets the expected limits and map it to a TestStand variable.
  4. In the Properties tab for the Action step, configure the Status Expression to evaluate the output parameter and return the desired result. You can set the expression to return:
    • Passed, when the comparison meets the expected limits
    • Error, when the comparison indicates a station or system issue

Additional Information

If you need the execution to follow TestStand's error handling flow (for example, to stop execution or trigger error callbacks), you can also configure the code module to raise an exception. This will generate a true run-time error in TestStand which can be handled as described in Handle TestStand Run-Time Errors.