Forum Discussion

chris_wie's avatar
chris_wie
Regular Visitor
7 years ago

How to Get TestStep Status in TestCase TearDown

Hello, everybody,
I hope you can help me. I am using the SOPAUI Open Source Version 5.4.

In TearDown Script for a test case I want to collect the status for test steps and their results. I don't want to use the testrunner for this.

I have compiled a script that at least determines the results of the test steps.
However, I would like to determine the test status Failed/OK. Unfortunately I don't get it.

testCase.getTestSteps().each{testStepName, testStep ->
   //log.info('Test Step: ' + testStepName)


   if(testStep in com.eviware.soapui.model.TestPropertyHolder){
    testStep.getProperties().each{propName, prop ->
     if (propName.contains("result")==true){
      log.info('TestStepName: ' + testStepName + "," + propName +"":" + prop.getValue())
     }
    }
   }
  }

Best Regards, Chris.

No RepliesBe the first to reply