Forum Discussion

Lagencie's avatar
Lagencie
Frequent Contributor
7 years ago

Why does automation not stop properly?

I have no plan, why it just goes on with the test ... failing teststep after teststep without stopping on error, even tho I have activated the Stop on Error: Test Item.

 

Shouldn't it stop the Test when an error occurs?

 

I tried to also activate in the project properties: Stop on Error - but when I also activate this, it stops the whole Project on an error.

3 Replies

  • cunderw's avatar
    cunderw
    Community Hero

    The stop on error on the test items page will stop any further executions of that test item after it finishes the current execution. If you want to stop it at the exact point that it errors you will want to create an on log error event handler and call Runner.Stop(true)

    • Lagencie's avatar
      Lagencie
      Frequent Contributor

      Will this Runner.Stop(true) stop the current test only or the whole testrun?

      As I am already using a script routine for the log on error, it would be easy to add - I am gonna try it and see if it works the way I want

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    That's a good question.  In my working with TestComplete, when I log an error, it should stop with the "stop on error" set as you do.

     

    I wonder if it's possible that these aren't necessarily seen as "errors" as they are object identification issues?  It's not explicitly a "log.error" or triggering similar code.  This is a question worth asking of the support team directly as this might be an issue.  What version of TC are you running?  I seem to remember in some previous versions of TC 12 that there was a bug fix or two for this type of thing.