weingrub
15 years agoNew Contributor
Saving attachments automatically
Hi There -
I was looking at an earlier post with the same title, and apparently you can save/access attachments by doing:
------------------
sure.. create a groovy script step after your request and use something like the following:
def testStep = testRunner.testCase.getTestStepByName( "request.." )
def response = testStep.testRequest.response
def outFile = new java.io.FileOutputStream( "myfile..")
def in = response.attachments[0].inputStream
com.eviware.soapui.support.Tools.writeAll( outFile, in )
Hope I got that right.. :-)
regards!
/Ole
eviware.com
---------------------
Can you still do this with the free version of SoapUI? My "response" object doesnt seem to have an "attachments" property!!!
;-) Thanks!
I was looking at an earlier post with the same title, and apparently you can save/access attachments by doing:
------------------
sure.. create a groovy script step after your request and use something like the following:
def testStep = testRunner.testCase.getTestStepByName( "request.." )
def response = testStep.testRequest.response
def outFile = new java.io.FileOutputStream( "myfile..")
def in = response.attachments[0].inputStream
com.eviware.soapui.support.Tools.writeAll( outFile, in )
Hope I got that right.. :-)
regards!
/Ole
eviware.com
---------------------
Can you still do this with the free version of SoapUI? My "response" object doesnt seem to have an "attachments" property!!!
;-) Thanks!