Contact Us
About Us
News
Home
Main Menu
Home
Eviware Store
Downloads
Products
News
Forum
Eviware Blog
Search
FAQs
Customer Area
Support
Documentation
Tutorials
CookBook
Downloads
Forum
Login Form
Welcome,
Guest
. Please
login
or
register
.
December 05, 2008, 12:10:28 am
Username:
Password:
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Forgot your password?
Saving attachments automatically
Welcome,
Guest
. Please
login
or
register
.
December 05, 2008, 12:10:28 am
News:
The Forums are up! Welcome to eviware.
Eviware Forum
soapUI
soapUI
Saving attachments automatically
« previous
next »
Pages:
[
1
]
Author
Topic: Saving attachments automatically (Read 442 times)
Wilco Schreurs
Newbie
Posts: 1
Saving attachments automatically
«
on:
November 02, 2007, 09:32:02 am »
I am testing a webservice that returns an attachment (MIME).
Is there a way to automatically save the retrieved attachment, preferably to a filename and folder that I can specify.
I know I can manually save attachments, but I would like to do that automatically, as part of a testsuite>testcase>teststep.
Maybe by using a particular assertion script?
Logged
omatzura
Administrator
Hero Member
Posts: 1,506
Re: Saving attachments automatically
«
Reply #1 on:
November 02, 2007, 10:05:37 am »
Hi!
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
Logged
Pages:
[
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> eviware general
-----------------------------
soapUI
-----------------------------
=> soapUI
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Powered by SMF 1.1.2
|
SMF © 2006-2007, Simple Machines LLC
Loading...