Forum Discussion
Radford
8 years agoSuper Contributor
You should be able to identify the status of the steps with a Groovy test step and the following code:
testRunner.getResults().each() { result -> if(result.getStatus().toString() != 'OK' ){ log.error('TestStep "' + result.getTestStep().getName() + '" finished with the status ' + result.getStatus().toString()) result.getMessages().each() { message -> log.error('Error message: ' + message) } } }
This step can be put, just before you datasource loop, at the moment this just logs the failed status messages, you can do what you need to instead.
If you are expecting steps to fail and you want to continue execution of your test case, you may need to look at the TestCase options? In particular the two options:
- Abort on Error
- Fail Test Case on Error
And set to suit your needs.
Related Content
- 5 years agounderqualified