Forum Discussion

BTscott's avatar
BTscott
Contributor
2 years ago

TestComplete Stop and rerun current item does not fire OnStopTest event when test fails

Greetings,

 

I am interested in using the Stop and Rerun Current Item process on error for our test suites. However, I noticed that the OnStopTest event does not fire when this option is selected. Is there a way to ensure that the OnStopTest event will at least fire on the final try if it is still a failure?

 

Thank you,

3 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    I think that is happening because it looks to me like the stop part of Stop and Rerun isn't an actual stop of the test. It's more like a pause and retry.  

     

    https://support.smartbear.com/testcomplete/docs/testing-with/running/control-test-flow/stop-and-rerun.html

     

    If a retry passes successfully or with warnings, TestComplete will mark this test item as successful or warning respectively and add info about the number of retries to the Summary report.

    If all rerun attempts fail, TestComplete will mark the test item as failed and proceed with the next test item.

     

    Do you want it to retry and then eventually stop the whole test or retry and eventually keep going?

     

     

     

     

    • BTscott's avatar
      BTscott
      Contributor

      I would like it to retry and keep going so that it can properly run through the clean-up steps in the OnTestStop event.

      • Marsha_R's avatar
        Marsha_R
        Champion Level 3

        npaisley Am I right about the Stop and Rerun?  I think it's going to continue no matter what, and that's why it doesn't trigger the OnTestStop event.