Forum Discussion
chrisb
11 years agoRegular Contributor
I implemented this in our project the following way:
1. Switch off the stop on error setting in the project.
2. Script the test so it calls runner.stop on a failure.
3. Enable the OnStopTest event handler in Events.
4. OnStopTest script does whatever clean up is required. Additionally in our project if its the final test in a run it does email notifications and some other stuff.
Calling Runner.Stop on a test failure will tell the test engine to start the next test. There are of course many ways to architect your project to do what you want. But in general terms, yes you can continue a test run when a test fails on an error. With the exception of some system level errors such as Test Complete objecting to a syntax error for example.
http://support.smartbear.com/viewarticle/55220/
And follow Robert's advice of using the try/catch block. It's a 'lifesaver' for us too, especially for catching javascript runtime errors.
1. Switch off the stop on error setting in the project.
2. Script the test so it calls runner.stop on a failure.
3. Enable the OnStopTest event handler in Events.
4. OnStopTest script does whatever clean up is required. Additionally in our project if its the final test in a run it does email notifications and some other stuff.
Calling Runner.Stop on a test failure will tell the test engine to start the next test. There are of course many ways to architect your project to do what you want. But in general terms, yes you can continue a test run when a test fails on an error. With the exception of some system level errors such as Test Complete objecting to a syntax error for example.
http://support.smartbear.com/viewarticle/55220/
And follow Robert's advice of using the try/catch block. It's a 'lifesaver' for us too, especially for catching javascript runtime errors.
Related Content
Recent Discussions
- 2 hours agotramuntana
- 2 days agoSlickRick