Jump to content


Issues with HTTP Session


  • Please log in to reply
4 replies to this topic

#1 Guest_Karthik_*

Guest_Karthik_*
  • Guests

Posted 13 March 2008 - 06:41 PM

Hi

We are evaluating the WAPT tool for load testing our J2EE web application in Celgene, USA. We are seriously considering buying this product.

I have one issue related to session context and HTTP session. Our application is a pure J2EE application developed using JSF framework. We do not have the session id as a part of the URL or as a link in any of our HTML pages due to security reasons. I was creating a scenario to load test a use case that extensively uses HTTP Sessions. I see that the Session Context is not maintained while running my use case between pages. Each request from the WAPT tool is stateless GET/POST request as per what I am seeing.

Is there any way to maintain the same session while load testing a use case? I went through the documentation and found only examples of using session id as part of URL or link in the HTML page, hence my question.

Thanks and Regards
Karthik

#2 Guest_angela_*

Guest_angela_*
  • Guests

Posted 14 March 2008 - 08:50 AM


Hi,

Could you please describe in more details the structure of your sessions (if possible, with sample profile, scenario and logs)?


#3 Guest_Karthik_*

Guest_Karthik_*
  • Guests

Posted 14 March 2008 - 01:52 PM

Hi

Thanks for the prompt response!!! It has been really wonderful and easy to use the WAPT tool until now!!

I have attached the profile XML file for the use case I am testing. This scenario cannot be run over the internet because the site is within our network and we are planning for a production launch later this year. If this profile is added to a new scenario in WAPT, the POST request to “page_7: http://<server name>:7001/s114a.faces” does not produce the desired results. We do not have the session id as part of the request, as part of the HTML form (as hidden field or URL parameter) as I have mentioned in my previous email.

The HTTPSession object is created as part of the controller component in the JSF framework i.e. ‘PageCodeBean’. It is created in one of the previous pages in the profile – ‘page_4: http://<server name>:7001/s302.faces’. However, the ‘session id’ and other information are not passed onto the HTML page that is displayed. The browser session is maintained and the web-site works fine in normal mode. However, while testing through the WAPT tool, it seems like the same session is not maintained during the ‘use case execution’. As a result, ‘page_7’ does not get the ‘HTTPSession’ object created by ‘page_4’.

Here is the excerpt from the logs for both the requests above:
POST /s302.faces HTTP/1.1
Cookie: JSESSIONID=np2zHZQQl5cl2TnlzxdpMHHrtyKx9LGTzD6fYY6YkZ1VymrbTPBH!-1747703710
Content-Type: application/x-www-form-urlencoded
Content-Length: 692
Host: raotestapp.celgene.com:7001
Referer: http://raotestapp.ce...7001/s301.faces
Connection: Keep-Alive
Accept: text/html, */*
Accept-Language: en-us, *
Accept-Encoding: compress, gzip, *
Pragma: no-cache
User-Agent: *WAPT 5.0*

form_account%3Ainp_lName=Simili&form_account%3Ainp_fName=Karthik&form_account%3Ainp_offAddress=1234%20Main%20St&form_account%3Ainp_offCity=Edison&form_account%3ADd_offState=40&form_account%3Ainp_offZip=08817&form_account%3Ainp_usrName=testuser13mar255&form_account%3Ainp_usrPassword=laxkar987%21&form_account%3AInp_usrPasswd2=laxkar987%21&form_account%3AInp_usrEmail=ksimili%40celgene.com&form_account%3Ainp_usrSsn=703800983&form_account%3Ainp_usrDea=&form_account%3Add_verifyQuestion=In%20what%20city%20were%20you%20born%3F&form_account%3Ainp_verifyAnswer=secbad&com.sun.faces.VIEW=_id3720%3A_id3779&form_account=form_account&form_account%3Abtn_continue.x=87&form_account%3Abtn_continue.y=16

<% 15:27:38 Response(200) %>
HTTP/1.1 200 OK
Date: Thu, 13 Mar 2008 19:27:37 GMT
Content-Type: text/html; charset=ISO-8859-1
Content-Language: en-US
X-Powered-By: Servlet/2.5 JSP/2.1
Cache-Control: private
Content-Encoding: gzip
Transfer-Encoding: chunked


<% 15:27:38 Content %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" href="theme/structure.css" type="text/css">
<title>Create Account</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="GENERATOR" content="Rational Application Developer">
..............
..............
..............

----------------------------------------------------------------------------------------------------------------------------

POST /s114a.faces; HTTP/1.1
Cookie: JSESSIONID=np2zHZQQl5cl2TnlzxdpMHHrtyKx9LGTzD6fYY6YkZ1VymrbTPBH!-1747703710
Content-Type: application/x-www-form-urlencoded
Content-Length: 210
Host: raotestapp.celgene.com:7001
Referer: http://raotestapp.ce...001/s114.faces;
Connection: Keep-Alive
Accept: text/html, */*
Accept-Language: en-us, *
Accept-Encoding: compress, gzip, *
Pragma: no-cache
User-Agent: *WAPT 5.0*

form_main%3Acb_agree=on&form_main%3Ainp_uName=testuser13mar255&form_main%3Ainp_uPassword=laxkar987%21&com.sun.faces.VIEW=_id3720%3A_id3823&form_main=&form_main%3Abtn_continue.x=173&form_main%3Abtn_continue.y=17

<% 15:27:39 Response(200) %>
HTTP/1.1 200 OK
Date: Thu, 13 Mar 2008 19:27:39 GMT
Content-Type: text/html; charset=ISO-8859-1
Content-Language: en-US
X-Powered-By: Servlet/2.5 JSP/2.1
Cache-Control: private
Content-Encoding: gzip
Transfer-Encoding: chunked


<% 15:27:39 Content %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" href="theme/structure.css" type="text/css">
<title>Create Account</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="GENERATOR" content="Rational Application Developer"
..............
..............
..............

----------------------------------------------------------------------------------------------------------------------------

In the log, both the requests get back the same response because the ‘session’ is lost while making the second request.

Please let me know if you need further information.

Any help on this issue will greatly help us proceed with out testing using the WAPT tool?

Thanks and Regards
Karthik

Attached Files



#4 Guest_angela_*

Guest_angela_*
  • Guests

Posted 18 March 2008 - 10:49 AM

Hi Karthik,

As far as we can see, in the log there is JSESSIONID in cookies which enables to distinguish requests from different users, and it works well. So, strictly speaking, we cannot say that there are no user sessions at all in your example. Possibly the problem is in something else?



#5 Guest_Linda_En_*

Guest_Linda_En_*
  • Guests

Posted 13 October 2009 - 05:04 PM

Hey there, having issues with the RPG tell us GMs here so we may help you have a better experience.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users