09-10-2009 10:47 AM
Hi all,
I have some code in CleanUp, which I don't want executed if a run time error has occurred in the Main sequence. It is possible to do this? I've noticed there's an option in the RTE window that pops up which allows the program to be terminated without running CleanUp, but I'd still like this to run if the test result is a pass/fail or if the sequence was terminated.
Appreciate any thoughts.
Thanks
Bruce
09-11-2009 01:08 AM
Hi,
You can do this by use of a pre-condition on the steps in you Clean-up. Have a Goto that will check, by use of AllOf, that an error has occurred in the main and if so jump the steps that you dont want to run.
Regards
Ray Farmer
09-11-2009 03:11 AM
Hi Ray
Thanks for your reply. I’m assuming this precondition in CleanUp would need to include a step error check for each statement in the main sequence? Is there any generic parameter I could test instead? I’m just wondering if it’s possible to avoid having to update this precondition, if the main sequence is modified.
Regards
Bruce09-11-2009 03:54 AM
Hi,
It probably depends if your Main Steps are set to run Clean-up if an error occurs.
If it does, you could use RunState.PreviousStep and check whether this has an error condition.
or you could use RunState.SequenceError but I'm not sure when this is updated.
Regards
Ray Farmer
09-11-2009 05:22 AM
09-11-2009 06:33 AM
09-14-2009 04:07 AM
Thanks Ray.
Hi Juergen,
Any chance you could send that routine again in 3.5? Unfortunately, I'm haven't yet upgraded my TestStand.
Thanks & regards
Bruce
09-14-2009 07:03 AM
09-17-2009 02:24 AM
Thanks Juergen, that's great.
Bruce