01-31-2012 08:27 PM
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.
01-31-2012 10:39 PM
02-01-2012 01:22 AM
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.
02-01-2012 01:46 AM
No really, you have to exit the top level MainSequence to get back to the Process Model Sequence (Test UUTs or Single Pass).
02-01-2012 02:12 AM
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.
02-01-2012 02:33 AM
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.
02-01-2012 06:31 AM
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.
02-01-2012 07:35 AM
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
02-01-2012 07:57 AM
Thanks for your insight Norbert - always good to learn more.