Forum Discussion

Andrew_89's avatar
Andrew_89
Occasional Contributor
7 years ago
Solved

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?

 

  •  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 

3 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

     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 

  • NisHera's avatar
    NisHera
    Valued Contributor

    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?

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      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