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:48:36 am
Username: Password:
Login with username, password and session length

Forgot your password?
 
how to test stateful services
Welcome, Guest. Please login or register.
January 09, 2009, 07:48:36 am
Home Help Search Login Register
News: The Forums are up! Welcome to eviware.

+  Eviware Forum
|-+  soapUI
| |-+  soapUI
| | |-+  how to test stateful services
« previous next »
Pages: [1] Print
Author Topic: how to test stateful services  (Read 1234 times)
Joe Gillon
Newbie
*
Posts: 1


« on: July 01, 2007, 08:36:23 pm »

I can't find any mention of testing stateful services.  I make a project, get the wsdl, try to connect/login request, which works, but all subsequent requests get 'no connection'.  Had to write the services statefully, would be nice to use this to test them.
Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,666


« Reply #1 on: July 01, 2007, 08:46:13 pm »

Hi!

usually, the first response returns some kind of identifier for the session-state, either as a HTTP Header or some kind of ID the response message. The ID must then be included in all subsequent requests so the server can associate the client with its state.. This is definetely possible with soapUI, but I can't say exactly how the service you are testing handles this.. is there some kind of SessionID being returned to your first request as mentioned above?

regards!

/Ole
eviware.com
Logged
Steven
Newbie
*
Posts: 1


« Reply #2 on: July 23, 2007, 05:53:28 pm »

The server returns a set-cookie header with the JSESSIONID.
The client is supposed to return the JSESSIONID in a http header,
which I have not seen either with soapUI.  It would be nice if that worked (cookie handler functionality).
Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,666


« Reply #3 on: July 23, 2007, 06:49:14 pm »

Hi,

You can enable cookie-based Session-State handling for a TestCase in the TestCase Options dialog, which should work in your case.. (let me know otherwise!)

best regards,

/Ole
eviware.com
Logged
jkam
soapui pro users
Newbie
*
Posts: 5


« Reply #4 on: January 30, 2008, 06:36:43 pm »

Hi,

I found this older topic, dealing with a similar issue to mine. I'm using SoapUI 2.0 Beta and I need to test a stateful service. As Ole suggests above, I looked in the Test Case Options dialog.  I checked 'Maintain HTTP Session' but that doesn't seem to copy cookies received in one response to the next request.

I too have a Set-Cookie: JSESSIONID=xxx in my first response, and if I copy this value to an HTTP header in the second request manually the session behaviour works fine. Is there another way of having SoapUI copy these cookie values automatically?

Thanks John
Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,666


« Reply #5 on: January 30, 2008, 10:06:03 pm »

Hi John,

hmm.. if the both requests go to the same host/service, then the "Maintain HTTP State" option should work.. can you check this?

Otherwise you will need to create 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.

regards,

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


« Reply #6 on: June 29, 2008, 11:02:32 am »

Hi,

I am also in a similar situation where in i have to test stateful services.
I have also enabled the option in the Test suite to maintain Http session.
It all works fine when i manually copy and paste the Set Cookie =XXX id into the request header of another request after login.

The sequence of steps that i have is
1 login :request step
2 set session : groovy script
3 do XYZ : request step

if i use the script as given in the example as in step2 (set session : groovy script) like

def state = context.getProperty( com.eviware.soapui.model.testsuite.TestRunContext.HTTP_STATE_PROPERTY )

i am getting the value of the state as null.

I am unable to proceed further because of this.Please let me know if i am wrong any where.Kindly help me fix this groovy script so that i can capture the session id of login method and add it in the subsequent requests in the groovy script.

Appreciate any help in this regard.

Thanks,
Lakshmi

Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,666


« Reply #7 on: August 04, 2008, 01:22:00 pm »

Hi Lakshmi,

sorry for the long delay.. are you still in need of help here?

regards!

/Ole
eviware.com
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