Forum Discussion
Hi,
You can use Runner.Stop(true) in-order to stop the current test item execution.
In a basic way, You can add this code into your OnLogError, then it will stop the current test item.
Reference:
- For adding event handler - https://support.smartbear.com/testcomplete/docs/testing-with/advanced/handling-events/creating-handlers/for-testcomplete-events.html
- Using Runner method - http://support.smartbear.com/testcomplete/docs/reference/project-objects/items/script/runner/stop.html
- Related topics that might help you
Additionally, if you have you scripts set up that each of them is a TestItem in the project, there's an option in the test items for "Stop on Error"
This option has three settings: None, Test Item, Project. If set to Test Item, if an error happens within that test item, it will only stop that Test Item. The next test item in your project will run accordingly then.
- AlexKaras7 years agoChampion Level 3
As a side note and mostly as a feature request for Support:
> This option has three settings: None, Test Item, Project.
Where 'Test Item' effectively means: 'stop processing current Test Item and all child ones and continue from the next sibling'.
From the usability point of view it would be extremely great to get one more option with the functionality like this: 'in case of error, stop processing this and all child Test Items, move up one level and continue processing from there'.
Related Content
Recent Discussions
- 2 hours agoSvetaG