End current iteration

4 posts, 1 answers
  1. Alan
    Alan avatar
    6 posts
    Member since:
    Aug 2011

    Posted 20 Nov 2012 Link to this post

    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
  2. Answer
    Cody
    Admin
    Cody avatar
    3354 posts

    Posted 21 Nov 2012 Link to this post

    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
  3. Alan
    Alan avatar
    6 posts
    Member since:
    Aug 2011

    Posted 26 Nov 2012 Link to this post

    Thanks Cody, that's exactly what I was looking for!

    Alan
  4. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 26 Nov 2012 Link to this post

    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
Back to Top