1

I am in a situation to write test step name, expected result, actual result of a SOAPUI test case into an external file and I do not know on how can I get the status of each test steps within my test case. For example, my SOAPUI test case will have Groovy Script, REST request test steps and I need to get the status of each of these test steps as and when they are executed and write it to an external text file. Could you please help me on how can I do this?

Sample groovy script test step

def tfscoesoapuiutility = context.testCase.testSuite.project.myObject(context)

def db = tfscoesoapuiutility.connectToDB()
def testSuiteName = tfscoesoapuiutility.getTestSuiteName()
def schemaName = tfscoesoapuiutility.getSchemaName()
def dataScenario = tfscoesoapuiutility.getTestCaseName()
tfscoesoapuiutility.retrieveDataScenario(dataScenario)
Srinivasan Ramu
  • 1,033
  • 4
  • 11
  • 23
  • Can you check if this is helpful? https://stackoverflow.com/questions/41700437/creating-a-test-report-from-project-level-tear-down-script – Rao Feb 01 '18 at 18:08

1 Answers1

4

Assuming that you got object of TestStep into variable step and use below statement to the status of the same:

log.info new com.eviware.soapui.impl.wsdl.teststeps.WsdlTestStepResult(step).status.toString()
Rao
  • 20,781
  • 11
  • 57
  • 77