06-13-2013 02:09 AM
Hello
I have made a sequence with 4 numeric limit teststeps who collect data and 3 step numeric limit steps who do calculations with the data from the 4 previous steps.
When one of the calculation steps fail i want to loop the sequence for max 3 times in order to gather new data for the calculations. When on of the data collect steps fail i want to go to the cleanup of the sequence and do no looping. In both situations the sequence has to fail in order to get the end result of the total test failing.
What is the best way to deal with this situation ?
Is it possible to change the looping conditions of the sequence on the fly? (switch looping off)
With kind regards
Tonnie
06-13-2013 04:01 AM
Pls check attached sequence.
This is one way of doing it.
For the data collect numeric limit step - in the post actions i have set "on fail " go to clean up.
For the data processing numeric limit step - in the post actions i have set on fail options to go to a "go to" step type.
There is a locals.try whose init value is 3.
The precondition for the go to step to execute is locals.try>0.
In the pre expression for go to locals.try is decremented by 1.
Now when a data collect numeric limit step fails - it directly goes to cleanup.
When a data processing step fails - it jumps to go - reduces the try count by 1 and restarts the data collect steps.
Go to - will execute only till locals.try is >0 i.e. 3 attempts.
Hope this helps.