06-26-2013 05:31 PM
Hi,
I am currently using Teststand 2010, I have a Step sequence in the Cleanup and I want to skip that step whenever a user click the "Terminate" button. I have tried all the precondition that I know, but still unable to skip the step. Is there any precondition/Post Action I could use to skip the step when I terminate the sequnce module? Any help would be greatly appreciated please see picture below.
Thanks,
WJ
WJ
Solved! Go to Solution.
06-27-2013 08:22 AM
Use a statement step at the beginning of your Cleanup step group. In it put:
RunState.Execution.GetStates(LocalsExecutionRunState, Locals.TerminationState)
You will have to create both the locals as numbers.
Then in your precondition you can say:
Locals.TerminationState == 1
Refer to the TestStand help for more information on that method and to look at the different state meanings:
ExecutionTerminationStates Enumeration
The Execution.GetStates method returns one of these values to indicate whether the execution is terminating. If the execution is terminating, these values indicate how it is terminating.
ExecTermState_Aborting–(Value: 4) TestStand is aborting the running execution.
ExecTermState_KillingThreads–(Value: 5) TestStand is ending the threads in the execution.
ExecTermState_Normal–(Value: 1) The execution is not terminating.
ExecTermState_Terminating–(Value: 2) TestStand is terminating the running execution.
ExecTermState_TerminatingInteractive–(Value: 3) TestStand is terminating the running interactive execution.
Hope this helps,
06-27-2013 10:17 AM - edited 06-27-2013 10:17 AM
Here is an expression you can use as the step precondition without the need to make other changes:
#NoValidation, // suppress the analyzer error for the non-existence of the temporary variable
Locals.SetValNumber("_terminationState", PropOption_InsertIfMissing, 0), // create a temporary variable
RunState.Execution.GetStates(0, Locals._terminationState ), // get the termination state
(Locals._terminationState == ExecTermState_Terminating && ( Locals.DeleteSubProperty("_terminationState", PropOption_NoOptions), True)) ? False : True
06-27-2013 11:23 AM
Hi,
Thank you for your help, I was able to resolve the issue
Thanks,
WJ
06-27-2013 11:25 AM
Hi,
Thank you for your help!
Thanks,
WJ