NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How Can I skip the remaining test steps when any test fails

Hi,

 

I want to skip the remaining test steps when any test step fails, directly go to the postUUT callback sequence, and do the next UUT normally.

How can I do that in teststand? Thanks.

 

0 Kudos
Message 1 of 9
(5,815 Views)
You could modify post actions on each step, in step settings, so that you go to e.g. 'end group' on fail.
0 Kudos
Message 2 of 9
(5,813 Views)

Is there any method that directly switch to post UUT callback sequence if any test step fails? But not to edit the post action of every step.

0 Kudos
Message 3 of 9
(5,806 Views)

No really, you have to exit the top level MainSequence to get back to the Process Model Sequence (Test UUTs or Single Pass).

Regards
Ray Farmer
0 Kudos
Message 4 of 9
(5,800 Views)

You can modify this setting on all steps in a flick though.

Select all the steps you want to skip to the end on fail, and edit Post actions.

Other settings are not affected.

undefined

0 Kudos
Message 5 of 9
(5,797 Views)

The suggested workflow in such conditions in TestStand is always to call the cleanup step group in order to revert the whole system to a secure state.

Therefore, your request comes done to the question: How can i handle the workflow of my sequence similar to the situation of a Runtime Error (still, we do need to differ between Fail and Error!)?

 

The simplest way to achieve this is to set the sequence property "Goto Cleanup on Sequence Failure".

 

hope this helps,

Norbert

 

PS: It is NOT suggested, to treat Runtime Errors the same as Failures in regard to error handling. In the case Runtime Error, the system encountered a state where the UUT cannot be tested due to an internal issue of the system. The Failure reflects the fact, that the system is working properly, but the UUT did not match the expected/tested specification.

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 6 of 9
(5,795 Views)

Norbert B wrote:

 

The simplest way to achieve this is to set the sequence property "Goto Cleanup on Sequence Failure".

 


 I had'nt thought about that one.

I noticed that debugging behaviour is a bit different in these two methods.

 

If you have the sequenceproperty enabled and you singlestep through your sequence and get to a failing step, when you step over, it jumps to <end group>. If you at this point try to "Set Next Step to Cursor" back to a step in 'Main' and hit step over/into, TS doesnt jump to this step, but to the first step in cleanup. If you have reached the first step in cleanup there's no problem, youre able to "Set Next Step to Cursor" to a step in main.

 

If you have the post action, it also jumps to <end group> on fail, but here you can "Set Next Step to cursor" to a step in 'Main' without it jumping back to Cleanup.

 

Just a minor detail i guess - a breakpoint at first step in Cleanup will enable you to debug your failing step in either case.

0 Kudos
Message 7 of 9
(5,784 Views)

That's explained quite easily:

The sequence status is still "Failed" hence, the condition for "Goto Cleanup" is still valid. So even if you change the index for "NextStep", the execution will still evaluate the status and proceed differently.

 

If you work with the PostAction, you only change the "NextStepIndex" once directly at the end of the step's execution. So you will be able to set any new "NextStepIndex" anytime after this without the execution to modify it back again.

 

It seems that once you executed the first step of the Cleanup, the execution will not evaluate for sequence failure again, so you can go out of Cleanup again..... i wonder if this could be considered a bug.....

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 8 of 9
(5,777 Views)

Thanks for your insight Norbert - always good to learn more.

0 Kudos
Message 9 of 9
(5,775 Views)