Monday, July 22, 2013

SOAP UI : Groovy Script to store response files in local directory


//Path and File name to store response
def responseFile = "C://response.xml"

//Reading response content into an object
def response = context.expand( '${MyRequestName#Response}' )
//Accesing file created
def file = new File(responseFile)
//Writing response into the file created
file.write(response, "UTF-8")

No comments:

Post a Comment