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.
November 22, 2008, 04:03:29 am
Username: Password:
Login with username, password and session length

Forgot your password?
 
require groovy script to capture Set Cookie id from HTTP Header table
Welcome, Guest. Please login or register.
November 22, 2008, 04:03:29 am
Home Help Search Login Register
News: The Forums are up! Welcome to eviware.

+  Eviware Forum
|-+  soapUI
| |-+  soapUI
| | |-+  require groovy script to capture Set Cookie id from HTTP Header table
« previous next »
Pages: [1] Print
Author Topic: require groovy script to capture Set Cookie id from HTTP Header table  (Read 417 times)
lakshmi
Newbie
*
Posts: 14


« on: June 28, 2008, 01:12:15 am »

Hi,

In order to maintain the user session in the test case ,if i copy the Set Cookie, HTTP Header Parameter manually into the subsequent  requests the session is maintained it works fine.

I Need help in creating a groovy-script between the two request that reads the response cookie of the first response and sets the corresponding request cookie in the following request.

Any help would be appreciated.

Thanks,
Lakshmi
Logged
lakshmi
Newbie
*
Posts: 14


« Reply #1 on: June 29, 2008, 01:25:25 am »

Hi,

This is with reference to my previous post.I am able to see the Http Header Information as shown below.I am not able to write the groovy code to capture the "Set-Cookie" parameter and set the same value in another request.

HTTP/1.1 200 OK
X-AspNet-Version: 2.0.50727
Date: Sat, 28 Jun 2008 13:40:30 GMT
Content-Length: 86
Set-Cookie: ASP.NET_SessionId=ycsvh455xliqpj554w2wym45; path=/; HttpOnly
Content-Type: text/xml; charset=utf-8
X-Powered-By: ASP.NET
Server: Microsoft-IIS/5.1
Cache-Control: private

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body/></s:Envelope>

Kindly help asap .

Thanks,
Lakshmi
Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,425


« Reply #2 on: June 29, 2008, 10:49:23 am »

Hi Lakshmi,

maybe you could just use the "Maintain Session State" option in the TestCase Options dialog, which transfers cookie information between requests?

regards!

/Ole
eviware.com
Logged
lakshmi
Newbie
*
Posts: 14


« Reply #3 on: June 30, 2008, 03:22:30 pm »

Hi Ole,

Thanks for the reply and it simply works great. Smiley
Now i am able to also have an integration test case flow with combinations of different requests and their respective groovy scripts to parse the respective response xmls.

Thanks again.

Regards,
Lakshmi
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