NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Several executions in parallel : goto cleanup of another sequence

Hi guys,

 

My test sequence has this architecture : it launches 2 executions in parallel and for them to finish. In these 2 executions are placed several subsequences and test to verify my UUT (see image attached).

My test sequence should follow this behavior : some of my subsequence are crucial to my test, so any step failing inside these sequences (and only these ones) should stop the UUT test. These sequences are set to 'go to cleanup on step failure'. Then my first idea was to add a post-expression to these sequences in order to terminate my 2 executions.

 

=> It works fine but I'm running into this issue : http://www.ni.com/white-paper/14067/en#224640_by_Category . I need to have the correct status of my test sequence, I can't accept that it returns 'Passed'. 'Terminated' or even better 'Failed' status in mandatory for me (reporting purpose).

 

So the second idea was to go to the cleanup of my two executions when one of this critical sequences have a fail status... But I can't find a way to set the PostAction to target a step (group) outside of the current step's sequence.

 

Any idea ?

 

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 1 of 2
(3,324 Views)

There is a way to detect that the execution was terminated. You can do the following:

 

1) Specify an object reference variable to store a reference to the execution when creating the sequence call.

2) After the wait step for the execution (i.e. after the execution has stopped), do something like:

 

Locals.myExecution.AsExecution.GetStates(Locals.runState, Locals.termState)

 

If the execution was terminated then Locals.termState == 2.


Hope this helps,

-Doug

0 Kudos
Message 2 of 2
(3,312 Views)