NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Always "Failed" after Sequence Call

I run in a sequence a "Sequence Call". Inside it, I have a loop that makes this new sequence run a maximum of 3 times or until some steps are OK. If for example in the second loop of this sequence the result is OK, the returned value to the sequence caller is always "Failed". It seems as TestStand answers always FAILED if somewhere in those loops was sometime failed. How is it possible to become a "PASSED" result if after some loops the sequence is ok? thanks
0 Kudos
Message 1 of 5
(3,456 Views)
Angel -
All steps have a "Step Failure Causes Sequence Failure" boolean setting on the Run Options tab of the Step Properties dialog box. By default this is on. If you turn it off, if the step fails, it will not update the status of the sequence. You must do this for all steps that might fail but should not set the status of the sequence.

Scott Richardson
Scott Richardson
https://testeract.com
0 Kudos
Message 2 of 5
(3,456 Views)
Inside the sequence you are calling in the loop, you must add a pre expression on the test you are repeating that sets RunState.SequenceFailed=False. This variable gets set true if the test fails. By setting it to false before you repeat the test, if the test passes the second time (or 3rd or 4th...), the variable will remain false and the calling sequence results in "PASSED". If you have more than one test in the sequence, you must create a boolean variable that holds true/false value depending on if any repeated tests failed every time, then set RunState.SequenceFailed accordingly before returning to the calling sequence. This is the variable that the calling sequence uses to determine pass/fail status.
- tbob

Inventor of the WORM Global
0 Kudos
Message 3 of 5
(3,456 Views)
One problem with this solution. If you specify a maximum of 3 tries, and the test fails each try, the sequence will not be updated with a fail flag like it should. In fact, using this method will ensure that the sequence always passes, even though a test failed for all tries.
- tbob

Inventor of the WORM Global
0 Kudos
Message 4 of 5
(3,456 Views)
Thanks tbob. This variable is what I was looking for.
0 Kudos
Message 5 of 5
(3,455 Views)