03-03-2023 02:12 PM
Hi,
I have a Test stand sequence and I want to restest all sequence, I meam , 1st Test all steps on the sequences and in case if I get any failure , I want to restest all the sequence from the begin.
I dont want to use the looping option for each step, The plan is reteste all sequences, At this momento is the sequence fail I start the sequence again, but the Final Resul in not overwritte with the result of the new loop.
Regards
Luis
03-11-2023 11:37 AM
The attached sequence does what you want.
There are three Pass/Fail test steps: Test 1, Test 2, and Test 3. Tests 1 and 3 are hardcoded to Pass. Test 2 accepts the local variable Locals.Local as an argument, and Locals.Local is set to False. Test 2 has Post Action on Fail set to GoTo the Setup step Clear Results which clears the array of step results. The Run Option Step Failure Causes Sequence Failure is unchecked for Test 2.
You can step through this sequence and see that Test 1 will run, and Test 2 will fail and send the sequence back to the setup step. Do this loop a few times then change the value of Locals.Local to True. The sequence will go through each test and pass. The recorded results will only show three tests with the Pass result.
Note that written, this sequence would guarantee infinite looping in a practical setting. You'll need to track the number of retries and create an exit condition.
Additionally, you'll want to create a sequence failure condition such as adding a test that fails the sequence if the maximum number of retries is reached.