You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by lichen970 <li...@hotmail.com> on 2012/08/10 00:50:25 UTC

weird Cookies behaviour

Hi, guys, I have a very weird situation now. I am testing an email web
page(imagine one that is smilar with gmail or hotmail webpage). My test plan
is like, first login, then open one email several times, finally logout.

The weird thing here is after some time of opening one email, it complains I
have logout while I am not. I then look at my request, I can see the
difference between the success requests and the failed ones , as shown below
respectively:
Cookie Data(success):
sqm_cookie_check=1344551832; key=l8qzI999S%2FM%3D;
squirrelmail_language=deleted; SQMSESSID=jp399em6njb0lim1jkjbnv7lu7

Cookie Data(failed):
sqm_cookie_check=1344551832; squirrelmail_language=deleted


As we can see, Jmeter did not send the key and session ID! I do not
understand how this could happen. Any clues? BTW, in my cookie manager, I
have tried both check or uncheck the "clear cookie after each iteration",
and tried cookie policy "compatible" and "default".





--
View this message in context: http://jmeter.512774.n5.nabble.com/weird-Cookies-behaviour-tp5714266.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: weird Cookies behaviour

Posted by sebb <se...@gmail.com>.
On 10 August 2012 17:01, lichen970 <li...@hotmail.com> wrote:
> I am now kind of suspecting it may the server side kill my session, since I
> saw the first failed request use a different session ID. Any suggestions?

Again: use the Tree View Listener to follow the cookies and sessions.

Best to try this with a single thread to make the job easier.

> Thanks.
>
>
>
>
>
> --
> View this message in context: http://jmeter.512774.n5.nabble.com/weird-Cookies-behaviour-tp5714266p5714294.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: weird Cookies behaviour

Posted by lichen970 <li...@hotmail.com>.
I am now kind of suspecting it may the server side kill my session, since I
saw the first failed request use a different session ID. Any suggestions?
Thanks.





--
View this message in context: http://jmeter.512774.n5.nabble.com/weird-Cookies-behaviour-tp5714266p5714294.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: weird Cookies behaviour

Posted by sebb <se...@gmail.com>.
On 10 August 2012 05:57, lichen970 <li...@hotmail.com> wrote:
> Thanks for replying me. I am sure that all request are https request. The problem is, in my test plan, which includes login, open an email,  back to email list,logout. I re-do the middle two step many times. After some time, it will get the error like "unknown user name or password", which suggests I have logged out. Just like my session has be finished/expired. When I do those in browser everything is ok.

> So I wonder if jmeter could possibly remove my cookies after some time?

No, JMeter does not drop cookies unless they expire.

You can follow the cookies by using a Tree View Listener.

> Sent from my iPhone
>
>
>
> 在 Aug 10, 2012,0:49,"prabhu [via JMeter]" <ml...@n5.nabble.com> 写道:
>
>> Hi,
>>    Is your application making transition from HTTP to HTTPS and back to HTTP again? If this is the case you have to watch out for secure cookies. When you hit a secure page you get a secure cookie from the server and stored in cookie manager. This secure cookie is not used for HTTP requests. So you should make sure to write a beanshell preprocessor which changes the property of secure cookie to insecure, so that it will be used in future requests. Have a look at the Response header of the first request that hits the sever. You will have a clear picture of cookies.
>>
>> Thanks
>> Prabhu
>>
>> If you reply to this email, your message will be added to the discussion below:
>> http://jmeter.512774.n5.nabble.com/weird-Cookies-behaviour-tp5714266p5714268.html
>> To unsubscribe from weird Cookies behaviour, click here.
>> NAML
>
>
>
>
> --
> View this message in context: http://jmeter.512774.n5.nabble.com/weird-Cookies-behaviour-tp5714266p5714269.html
> Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: weird Cookies behaviour

Posted by lichen970 <li...@hotmail.com>.
Thanks sir.
But the problem remains... Could you briefly describe your situation at that
time? Thanks




--
View this message in context: http://jmeter.512774.n5.nabble.com/weird-Cookies-behaviour-tp5714266p5714292.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: weird Cookies behaviour

Posted by Sergio Boso <se...@bosoconsulting.it>.
Hi,

I had similar issues in in the past, which I overcome by setting:

CookieManager.check.cookies=false

in jmeter.properties.
You may want to give it a try.

regards
Sergio


Il 10/08/2012 06:57, lichen970 ha scritto:
> Thanks for replying me. I am sure that all request are https request. The problem is, in my test plan, which includes login, open an email,  back to email list,logout. I re-do the middle two step many times. After some time, it will get the error like "unknown user name or password", which suggests I have logged out. Just like my session has be finished/expired. When I do those in browser everything is ok. So I wonder if jmeter could possibly remove my cookies after some time?
>
> Sent from my iPhone
>
>
>
> 在 Aug 10, 2012,0:49,"prabhu [via JMeter]" <ml...@n5.nabble.com> 写道:
>
>> Hi,
>>     Is your application making transition from HTTP to HTTPS and back to HTTP again? If this is the case you have to watch out for secure cookies. When you hit a secure page you get a secure cookie from the server and stored in cookie manager. This secure cookie is not used for HTTP requests. So you should make sure to write a beanshell preprocessor which changes the property of secure cookie to insecure, so that it will be used in future requests. Have a look at the Response header of the first request that hits the sever. You will have a clear picture of cookies.
>>
>> Thanks
>> Prabhu
>>
>> If you reply to this email, your message will be added to the discussion below:
>> http://jmeter.512774.n5.nabble.com/weird-Cookies-behaviour-tp5714266p5714268.html
>> To unsubscribe from weird Cookies behaviour, click here.
>> NAML
>
>
>
> --
> View this message in context: http://jmeter.512774.n5.nabble.com/weird-Cookies-behaviour-tp5714266p5714269.html
> Sent from the JMeter - User mailing list archive at Nabble.com.


-- 

Ing. Sergio Boso

I




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: weird Cookies behaviour

Posted by lichen970 <li...@hotmail.com>.
As I said before, after certain times run, the "open email" will fail. The
login should be OK, since I can see its header is same with the successful
ones followed it. I am kind of suspect it might be the server side kill the
session? Below I will show the request header of both success and failed
ones. 

Success:

open an email:
/GET https://XXXXXXX/read_body.php?mailbox=INBOX&passed_id=1&startMessage=1

Cookie Data:
sqm_cookie_check=1344613229; key=JKleC18s5Do%3D;
squirrelmail_language=deleted; SQMSESSID=c4bflvneelm079hed9j8v1uvf1

Request Headers:
Accept-Language: en_US
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)
Connection: keep-alive
Accept: image/jpeg, application/x-ms-application, image/gif,
application/xaml+xml, image/pjpeg, application/x-ms-xbap,
application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword,
*/*
/
back to main page of inbox

/GET
https://XXXXXXXX/right_main.php?PG_SHOWALL=0&sort=0&startMessage=1&mailbox=INBOX

Cookie Data:
sqm_cookie_check=1344613229; key=JKleC18s5Do%3D;
squirrelmail_language=deleted; SQMSESSID=c4bflvneelm079hed9j8v1uvf1

Request Headers:
Accept-Language: en_US
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)
Connection: keep-alive
Accept: image/jpeg, application/x-ms-application, image/gif,
application/xaml+xml, image/pjpeg, application/x-ms-xbap,
application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword,
*/*/

And the failed ones.
/GET https://XXXXXXXX/read_body.php?mailbox=INBOX&passed_id=1&startMessage=1

Cookie Data:
sqm_cookie_check=1344613229; squirrelmail_language=deleted

Request Headers:
Accept-Language: en_US
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)
Connection: keep-alive
Accept: image/jpeg, application/x-ms-application, image/gif,
application/xaml+xml, image/pjpeg, application/x-ms-xbap,
application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword,
*/*/

/GET
https://XXXXXXXX/right_main.php?PG_SHOWALL=0&sort=0&startMessage=1&mailbox=INBOX

Cookie Data:
sqm_cookie_check=1344613229; squirrelmail_language=deleted;
SQMSESSID=a42fmrlt41c8mudm6f5unr8t45

Request Headers:
Accept-Language: en_US
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)
Connection: keep-alive
Accept: image/jpeg, application/x-ms-application, image/gif,
application/xaml+xml, image/pjpeg, application/x-ms-xbap,
application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword,
*/*

/



--
View this message in context: http://jmeter.512774.n5.nabble.com/weird-Cookies-behaviour-tp5714266p5714293.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: weird Cookies behaviour

Posted by lichen970 <li...@hotmail.com>.
Thanks for replying me. I am sure that all request are https request. The problem is, in my test plan, which includes login, open an email,  back to email list,logout. I re-do the middle two step many times. After some time, it will get the error like "unknown user name or password", which suggests I have logged out. Just like my session has be finished/expired. When I do those in browser everything is ok. So I wonder if jmeter could possibly remove my cookies after some time? 

Sent from my iPhone



在 Aug 10, 2012,0:49,"prabhu [via JMeter]" <ml...@n5.nabble.com> 写道:

> Hi, 
>    Is your application making transition from HTTP to HTTPS and back to HTTP again? If this is the case you have to watch out for secure cookies. When you hit a secure page you get a secure cookie from the server and stored in cookie manager. This secure cookie is not used for HTTP requests. So you should make sure to write a beanshell preprocessor which changes the property of secure cookie to insecure, so that it will be used in future requests. Have a look at the Response header of the first request that hits the sever. You will have a clear picture of cookies. 
> 
> Thanks 
> Prabhu 
> 
> If you reply to this email, your message will be added to the discussion below:
> http://jmeter.512774.n5.nabble.com/weird-Cookies-behaviour-tp5714266p5714268.html
> To unsubscribe from weird Cookies behaviour, click here.
> NAML




--
View this message in context: http://jmeter.512774.n5.nabble.com/weird-Cookies-behaviour-tp5714266p5714269.html
Sent from the JMeter - User mailing list archive at Nabble.com.

Re: weird Cookies behaviour

Posted by lichen970 <li...@hotmail.com>.
One thing forgot to mention, after one "open email" request fails, all the
following fail. We can see, all the following request will not send the
"key", but will send a different session ID.





Cookie Data:
$Version=0; sqm_cookie_check=1344552645; $Path=/cl0351/;
squirrelmail_language=deleted; $Path=/cl0351/;
SQMSESSID=njnuh5cbmckrb1l32fari2bs94; $Path=/cl0351/




--
View this message in context: http://jmeter.512774.n5.nabble.com/weird-Cookies-behaviour-tp5714266p5714267.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org