NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I run a step only if TestStand not is terminated?

I want to run a step I Cleanup only if TestStand not is terminated. Is there a variable I can read who tell this?
0 Kudos
Message 1 of 4
(3,512 Views)
To Jan Inge -
The only way to determine if an execution is terminating is to use an ActiveX Adapter step to call
Execution.GetStates and determine if the termState parameter that the method returns is ExecTermState_Normal(value 1). You would probably call this step in the cleanup group first, store the result in a local variable and use the precondition for the next step to check its value.

Scott Richardson (NI)
Scott Richardson
https://testeract.com
0 Kudos
Message 2 of 4
(3,512 Views)
OK

Could you please make a small example that demonstrates this?

Regards Jan Inge Gustavsen
0 Kudos
Message 3 of 4
(3,512 Views)
Jan Inge -
I did not know whar version of TS you are using so I created the sequence using TS 2.0.

In the example a save the state to the numeric result of a numeric limit step and the step determines that execution is normal if the state is 1, so the step passes, otherwise it fails. The precondition of the next steps use the pass/fail status of the first step. This way you do not need a local variable.

Scott Richardson (NI)
Scott Richardson
https://testeract.com
Message 4 of 4
(3,512 Views)