header
header
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.
January 09, 2009, 07:36:57 am
Username: Password:
Login with username, password and session length

Forgot your password?
 
Create TestReport from the request and response in soupUI
Welcome, Guest. Please login or register.
January 09, 2009, 07:36:57 am
Home Help Search Login Register
News: The Forums are up! Welcome to eviware.

+  Eviware Forum
|-+  soapUI
| |-+  soapUI
| | |-+  Create TestReport from the request and response in soupUI
« previous next »
Pages: [1] Print
Author Topic: Create TestReport from the request and response in soupUI  (Read 539 times)
srinivas das l
Newbie
*
Posts: 6


« on: July 28, 2008, 12:28:25 pm »

Can any one tell me how to save Request and Response in a doc file .
what is the groovy script for that??
Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,666


« Reply #1 on: August 04, 2008, 12:34:44 pm »

Hi!

sure.. try the following after you have received a response:

Code:
def testRequest = testRunner.testCase.testSteps["Request 1"].testRequest
def out = new FileWriter( "out.txt" )

out.println( testRequest.requestContent )
out.println( testRequest.response.contentAsString )

Hope this helps!

regards,

/Ole
eviware.com
Logged
srinivas das l
Newbie
*
Posts: 6


« Reply #2 on: August 05, 2008, 04:48:57 am »

Thanx for the script.IT's really useful...but i want that to be done using a single script..like we can add that script to a testsuite and whenever we run that suite....all the Request and Response get printed in a text file with a single click...
Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,666


« Reply #3 on: August 05, 2008, 07:28:30 am »

Hi!

well, that's not as easy, but still possible.. you would have to create a TestRunListener extension that intercepts all teststep executions, checks that the result is a WsdlTestRequestStepResult and logs the request/response accordingly. If you don't want this to apply to all teststeps run in soapUI, you could check for a TestCase property in the listener to enable/disable logging.. have a look at http://www.soapui.org/architecture/extensions.html to get going with soapUI extensions..

makes sense?

regards!

/Ole
eviware.com
Logged
BhuvanShanmugam
Newbie
*
Posts: 18



« Reply #4 on: August 07, 2008, 11:19:44 am »

Srinivas,

Could you please let me know how you got on with ole's suggestion.

I am interested in having this logging feature at testsuite/project level as well.

Thanks,
Bhuvan.
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
header header
header
header