Forum Discussion
Now after running changed scripts, .zip file is created. However, cannot open it, please see attached picture. Would you please see which script line I missed? Thanks.
def responseBody=testRunner.testCase.getTestStepByName("ExportApplication").httpRequest.response.responseContent; //InputStream ins = new ByteArrayInputStream(responseBody.getBytes("UTF-8")) InputStream ins = new ByteArrayInputStream(responseBody.getBytes()) log.info responseBody def outFile = new FileOutputStream(new File('C:/temp'+'/TestCreateDeleteApp_1.0.zip')) if (ins) { com.eviware.soapui.support.Tools.writeAll(outFile, ins ) } ins.close() outFile.close()
Hi All,
I used the script from the previous answer and was able to save a zip. When I open the zip and try to open the xml inside I get a Data error 'file is broken'.
What am I doing wrong?
- jurven0078 years agoOccasional Contributor
Thanks, I will open a new request
- ArunaBhukya5 years agoNew Contributor
I am also facing same problem. Able to save the zip file to local but unable to open the file which inside. Please help me.
- sonya_m5 years agoSmartBear Alumni (Retired)
Hi ArunaBhukya! This thread is quite old, it would be great if you created a new topic and shared the specifics of your issue there.
If you don’t feel like doing that, feel free to provide more details here and we’ll see how we can help 😊
Related Content
- 11 months ago