Set the Flag for the Sequence Terminating Operator in TestStand

Updated Jun 9, 2023



  • TestStand

How can a flag be set for the sequence final ending statement to FAIL, it currently results in PASS. The Expression statement in Step Settings to set to FAIL, but can't get it to work.

In order to do this, follow the steps below:

1.  Choose the step with condition: (for example, in this case “Verify voltage”)
2.  In the Step Settings, go to the Properties section:

3. Choose Expressions and in the Post-Expression filed put this expression:

Locals.Measure_12v =Step.Result.Response


4. Then from the Main sequence go to into the Else function and choose message pop-up step (in this case “Test Close”):


5.1 Go to Properties - Post Actions and from On Condition False choose Goto step, and from appeared section choose the step that you need to go back (in this case "Verify voltage"):
5.2 And use custom condition:

6.1 In the last step, we will set a flag, which in general means that after completing the step, you can put custom status as shown below:

Screenshot 2021-12-08 115550.png

6.2  To do this config, you should add this expression​​ Step.Result.Status = "Hello" into Step Settings - Properties - Expressions - Status Expressions, in the step that you want as shown below:

Screenshot 2021-12-08 122422.png


Finally, we will see a custom "Hello" status in the status column:

Screenshot 2021-12-08 122739.png