Forum Discussion
Radford
10 years agoSuper Contributor
The following is a Test Case teardown script that iterates through all the test steps might help out:
for(result in testRunner.getResults()){
if(result.getStatus().toString() != 'OK' ){
def failedTestStepName = result.getTestStep().getName()
log.error('TestStep "' + failedTestStepName + '" finished with the status ' + result.getStatus().toString())
for(testProperty in testCase.getTestStepByName(failedTestStepName).getPropertyList()){
log.info(testProperty.getName() + ' = ' + testProperty.getValue())
}
for(message in result.getMessages()){
log.error('Error message: ' + message)
}
}
}niravk17
10 years agoOccasional Contributor
Thank you Radford .
While execution of test case one of my assertion step get fail but still process of execution is 'Finished " and its printing finished status not failed
If you opt out Abort on failed test cases its still log as "finished" instead of failed
Please find the attchment