12-10-2008 06:28 AM
Hello!
has anybody tried to implemented a custom test step which loops on failure until a timeout occurs? Unfortunatly, this is not one of the default looping option in TestStand.
I try to test an asynchronous system with signal delays and want to retry a teststep for a certain period of time before declaring it "failed".
Is there any way to do this? I have already tried a few this including executing a substep in the custom post action condition, which modifies the SeqeunceContext.NextStepIndex Property as shown in an NI example of a retry button in a custom operator interface. The code is run, the property is modified, but the step is not repeated. Can anybody help?
Solved! Go to Solution.
12-10-2008 09:13 AM
Hi,
Can you post your example that you are trying?
Regards
Ray Farmer
12-11-2008 01:51 AM
Hi!
My question is obsolet now as I managed to get it working now.
I use four step variables called Timeout, StartTicks, StartTicksValid, and ExecutionTime. I then added two substeps, a prestep setting the StartTicks if invalid and a poststep calculating the elapsed time since setting the StartTicks. Then I use a custom loop expression comparing the execution time to the timeout and stopping if either there was one success or the time limit is exceeded. Success of the whole loop is then determined by looking at the number of passed loop steps, which has to be != 0.
Now I have to take a look again how to modify the report to contain the data I want. I do not want to get the intermediate result and the loop counts, but instead the execution time. This should be a RTFM job.
Thanks for your willingness to help.
hit74