Forum Discussion
SmartBear_Suppo
Alumni
11 years agoHi,
Try the following script and fill in where needed.
Regards,
Marcus
SmartBear Support
Try the following script and fill in where needed.
for ( testCaseResult in runner.results)
{
log.info testCaseResult
testCaseName = testCaseResult.getTestCase().name
log.info "test case name: " + testCaseName
if ( testCaseResult.getStatus().toString() == com.eviware.soapui.model.testsuite.TestStepResult.TestStepStatus.FAILED.toString() )
{
log.info "Test case " + testCaseName + " failed"
for (testStepResult in testCaseResult.getResults() )
{
if(testStepResult.getStatus().toString() == com.eviware.soapui.model.testsuite.TestStepResult.TestStepStatus.FAILED.toString())
{
def testStep = testStepResult.getTestStep()
log.info testStep.name
//do what needs to be done here to get the response content for the testStep
}
}
}//end if
}//end for
Regards,
Marcus
SmartBear Support