Forum Discussion

kakabubu's avatar
kakabubu
Contributor
6 years ago
Solved

How 'Stop on error' should act for two projects within one project suite?

We have testComplete project suite for our automated tests. There is a project (P1) with ~300 tests, designed in a way to run them ignoring errors occurring and just posting them to the log. Recen...
  • cunderw's avatar
    cunderw
    6 years ago

    Having the option checked to stop on error in the project properties page will stop the entire project and cause the options on the test items page to have no effect:

     

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

     

    The test item’s Stop on error property only has effect if the project’s Stop on error option is disabled.

    The test item’s Stop on exception property only has effect if the project’s Error dialog option is disabled.

     

    So you would want to turn that off. At the same time setting the test item properties to stop on error Test Item, isn't exactly what it sounds like. It will actually attempt to finisht running the test item in it's current iteration but then stop any further iterations or child test items. A little misleading, but that's what documentation is for :)

     

    If you want the test item to stop exactly when an error occurs the OnLogError event handler is your best choice, using it to call Runner.Stop(true).

     

    https://support.smartbear.com/testcomplete/docs/reference/project-objects/items/script/runner/stop.html