cancel
Showing results for 
Search instead for 
Did you mean: 

Test Item Loop Stops after one Iteration has an Error

SOLVED
Highlighted
Occasional Contributor

Test Item Loop Stops after one Iteration has an Error

I have a test item which has Count = 10.

I want the test item to always run 10 times, regardless of whether previous iterations have failed or have errors.

 

Currently, the loop only completes 10 iterations if all iterations complete without throwing an error.

 

Stop on error is unchecked in the Current Project Properties menu.

 

Any ideas on how I can continue the loop after an error?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

Re: Test Item Loop Stops after one Iteration has an Error

 There are two columns on the test items page that are not visible by default.  On the test items page, right click on the column headers, select field chooser, and then add the two columns "Stop on error" and "stop on exception" to your test items page.

 

Then... for your test item, set both those to "Never" and it will run that item 


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

3 REPLIES 3
Community Hero

Re: Test Item Loop Stops after one Iteration has an Error

 There are two columns on the test items page that are not visible by default.  On the test items page, right click on the column headers, select field chooser, and then add the two columns "Stop on error" and "stop on exception" to your test items page.

 

Then... for your test item, set both those to "Never" and it will run that item 


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

Highlighted
Valued Contributor

Re: Test Item Loop Stops after one Iteration has an Error

also to add to @tristaanogre you may have to think of situation what if your application throws error in the middle (say 6th iteration) is it ready to run again for next iteration?

Highlighted
Community Hero

Re: Test Item Loop Stops after one Iteration has an Error


@NisHera wrote:

also to add to @tristaanogre you may have to think of situation what if your application throws error in the middle (say 6th iteration) is it ready to run again for next iteration?


Certainly!  A "cleanUpRecovery" that you call at the end of every test case, possibly utilizing try/catch/finally

 


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors