Hi,
Is it that you want to skip non SOAP TestSteps in your script, dumping just the SOAP ones? Like this:
import com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep
def folderPath = '/temp/' + testSuite.name + '_' + System.currentTimeMillis() + File.separator
new File(folderPath).mkdirs()
// for each testCase in the testSuite
testSuite.testCases.each { testCaseName, testCase ->
// path for this testCase
def folderPathSuite = folderPath + testCaseName + File.separator
new File(folderPathSuite).mkdir()
// for each testStep
testCase.testSteps.each { testStepName, testStep ->
log.info testStep.class
if (testStep.class == WsdlTestRequestStep){
// define a file
def file = new File(folderPathSuite + testStepName + '_response.xml')
// get the response and write to file
file.write(testStep.getProperty('Response').getValue())
}
}
}
Thanks,
Rupert