Customizing the Status Result of a TestStand Pass/Fail Step

Updated Jul 11, 2018

Reported In

Software

  • TestStand

Issue Details

I want to configure, modify, or customize the logic that determines the Pass/Fail result of my step in TestStand.
 

Solution

You have two options that will allow you to set your pass/fail conditions based on a custom expression containing multiple values.
  1. Modify the Data Source:
    1. In the Step Settings panel, go to the Data Source tab.
    2. Replace Step.Result.PassFail with your custom condition. You can use the Expression Browser dialog to help you construct the condition.
    3. Click the Check Expression for Errors button to verify that your expression is syntactically correct.
  1. Modify Step.Result.PassFail in the Post-Expression:
    1. In the Step Settings panel, go to the Properties tab and click Expressions.
    2. Assign a custom expression to Step.Result.PassFail in the Post-Expression field. You can use the Expression Browser dialog to help you construct the condition.
    3. Click the Check Expression for Errors button to verify that your expression is syntactically correct.

Additional Information

The pass/fail status for this step type is determined by the Status Expression:

Step.DataSource != "Step.Result.PassFail" ? Step.Result.PassFail = Evaluate(Step.DataSource) : False, Step.Result.PassFail ? "Passed" : "Failed"

This means that if the Data Source expression is not the expression Step.Result.PassFail, the Status Expression will set the boolean Step.Result.PassFail to the result of the Data Source expression. You can see this expression by going to the Properties tab in the Step Settings panel and clicking on Expressions.

This can also be used to pass status information from lower level sub sequences to the top level sequence by using the Data Source AllOf(Custom Condition, Step.Result.Status != "Failed" when using a PassFail sequence call step type.

WAS THIS ARTICLE HELPFUL?

Not Helpful