Capturing a response to a soapUI test run

I am using soapUI testrunner.bat to run a test from the command line. I would like to examine the answer to a web service call. This is easy to do from the user interface, but I have not seen an option that will produce a response to the file. Here is the command I'm using:

testrunner.bat -sSuite -cPingProduction -r -I "C: \ Program Files \ eviware \ Projects \ Project-webchecker-soapui-project.xml"

This command creates a log file, but there is no response / request.

Thank.

+5
source share
1 answer

I did this by creating a test step (in a test case) and using this Groovy Script:

def response = context.expand( '${request#Response}' ) 
// where request is the name of your request
new File( "C:/response.txt" ).write( response )

testrunner.bat , , .

+6

All Articles