This is a migrated thread and some comments may be shown as answers.
End current iteration
3 Answers 33 Views
This is a migrated thread and some comments may be shown as answers.
Alan
Top achievements
Rank 2
Alan asked on 20 Nov 2012, 08:50 PM
Hello,

Is there a way to end the current iteration in the middle of a test and go to the next iteration?

Thanks!

if x == false
   //end iteration (and automatically begin the next)
if x == true
   //continue on with remaining test steps

3 Answers, 1 is accepted

Sort by
0
Accepted
Cody
Telerik team
answered on 21 Nov 2012, 11:46 PM
Hi Alan,

Do you care whether or not that iteration is marked PASS or FAIL? You could always just throw an exception in a coded step to force that iteration to stop. But this will mark that iteration as failed in the process:

if (some condition is true)
    throw new Exception("Aborting due to condition X");

In the above example the iteration will only abort if the condition being tested is true. Else it will continue on to the next test step.

Greetings,
Cody
the Telerik team
Are you enjoying Test Studio? We’d appreciate your vote in the ATI automation awards.
Vote now
0
Alan
Top achievements
Rank 2
answered on 26 Nov 2012, 03:14 PM
Thanks Cody, that's exactly what I was looking for!

Alan
0
Cody
Telerik team
answered on 26 Nov 2012, 03:51 PM
Hello,

Glad I could help. Let me know if I can assist further.

Greetings,
Cody
the Telerik team
Are you enjoying Test Studio? We’d appreciate your vote in the ATI automation awards.
Vote now
Asked by
Alan
Top achievements
Rank 2
Answers by
Cody
Telerik team
Alan
Top achievements
Rank 2
Share this question
or