Re: Cookie Manager Question
Test plan looks fine. A few suggestions: Any messages in jmeter.log? The most likely problem is that the cookie manager (CM) is somehow not finding a match for the cookie domain. Or the cookie is not being passed to the CM. You could try enabling debug logging for the CM, but as far as I remember it hasn't got much logging code... Try creating your own cookie in the CM to see how it is treated. This might give some clues as to what is going on. If none of this works, I guess the next stage would be to update the CM code to add some more detailed logging. Let us know if that is the case. S. On 5/17/05, Chad La Joie [EMAIL PROTECTED] wrote: I'm using JMeter 2.0.3 on JDK 1.5 and I'm running in to unexpected behavior from the cookie manager. I have a very simple test plan. Go to home page, login, go to a restricted (i.e. you need to be logged in) form. Log in is done just by posting a user id and password with a session cookie being set upon successful authentication. However, the cookie manager in my thread group does not capture this cookie, so when I try to go the restricted form page I get an error about not having access (which is correct). Here's the layout of my test plan Test Plan - Thread Group - HTTP Request defaults (has my server and protocol (HTTPS)) - HTTP Cookie Manager - Simple controller - HTTP Request (for home page) - Once Only Controller - HTTP Request (post to log in page) - Loop Controller - HTTP Request (for getting the form) - Constant Timer (pause for a bit) - View Results Tree I've tried moving the cookie manager around to different places and disabling SSL on the server. Neither made a difference. In the results for the HTTP Request doing the log in POST I can see the response trying to set the cookie. So, what am I missing here? -- Chad La Joie 315Q St. Mary's Hall Project Sentinel 202.687.0124 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cookie Manager Question
I'm using JMeter 2.0.3 on JDK 1.5 and I'm running in to unexpected behavior from the cookie manager. I have a very simple test plan. Go to home page, login, go to a restricted (i.e. you need to be logged in) form. Log in is done just by posting a user id and password with a session cookie being set upon successful authentication. However, the cookie manager in my thread group does not capture this cookie, so when I try to go the restricted form page I get an error about not having access (which is correct). Here's the layout of my test plan Test Plan - Thread Group - HTTP Request defaults (has my server and protocol (HTTPS)) - HTTP Cookie Manager - Simple controller - HTTP Request (for home page) - Once Only Controller - HTTP Request (post to log in page) - Loop Controller - HTTP Request (for getting the form) - Constant Timer (pause for a bit) - View Results Tree I've tried moving the cookie manager around to different places and disabling SSL on the server. Neither made a difference. In the results for the HTTP Request doing the log in POST I can see the response trying to set the cookie. So, what am I missing here? -- Chad La Joie 315Q St. Mary's Hall Project Sentinel 202.687.0124 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cookie Manager Question
Hello All, I'm using JMeter to test a login session that basically involves sending two requests. The first request sends a static Cookie (predefined in my CSV file). The response for that request includes some set-cookie headers that I want to use for the request #2. However, I also want to include my static Cookie from the first request as so: Request 1: GET /someurl Cookie: un=123456 Response: set-cookie: wosid=jGhVyqhtLM7s; version=1; path=/somepath set-cookie: woinst=1; version=1; path=/somepath Request 2: GET /someurl/login Cookie: un=123456; woinst=1; wosid= jGhVyqhtLM7s I've defined my test plan with the following User Parameters: Then, a header manager that defines the Cookie header using my static cookie: Then, my cookie manager explicitly stores that cookie: This works fine for the first request, but the second request is missing my un cookie. Any suggestions would be appreciated. Thanks Jennifer Ward - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cookie Manager Question
Hello All, I'm sending this again since it looks like my attachments got stripped out the first time. I'm using JMeter to test a login session that basically involves sending two requests. The first request sends a static Cookie (predefined in my CSV file). The response for that request includes some set-cookie headers that I want to use for the request #2. However, I also want to include my static Cookie from the first request as so: Request 1: GET /someurl Cookie: un=123456 Response: set-cookie: wosid=jGhVyqhtLM7s; version=1; path=/somepath set-cookie: woinst=1; version=1; path=/somepath Request 2: GET /someurl/login Cookie: un=123456; woinst=1; wosid= jGhVyqhtLM7s I've defined my test plan with the following User Parameters: username ${__CSVRead(...)} password ${__CSVRead(...)} uname-cookie ${__CSVRead(...)} Then, a header manager that defines the Cookie header using my static cookie: Cookie ${uname-cookie} Then, my cookie manager explicitly stores that cookie: un ${uname-cookie} This works fine for the first request, but the second request is missing my un cookie. Any suggestions would be appreciated. Thanks Jennifer Ward - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cookie Manager Question
Have you got more than one cookie manager in the test plan? If so, you need to make sure that they are not both in scope at the same time, as only one will be actioned. You can do this by adding each as a child of the relevant sampler. S. On 4/12/05, Jennifer Ward [EMAIL PROTECTED] wrote: Hello All, I'm sending this again since it looks like my attachments got stripped out the first time. I'm using JMeter to test a login session that basically involves sending two requests. The first request sends a static Cookie (predefined in my CSV file). The response for that request includes some set-cookie headers that I want to use for the request #2. However, I also want to include my static Cookie from the first request as so: Request 1: GET /someurl Cookie: un=123456 Response: set-cookie: wosid=jGhVyqhtLM7s; version=1; path=/somepath set-cookie: woinst=1; version=1; path=/somepath Request 2: GET /someurl/login Cookie: un=123456; woinst=1; wosid= jGhVyqhtLM7s I've defined my test plan with the following User Parameters: username ${__CSVRead(...)} password ${__CSVRead(...)} uname-cookie ${__CSVRead(...)} Then, a header manager that defines the Cookie header using my static cookie: Cookie ${uname-cookie} Then, my cookie manager explicitly stores that cookie: un ${uname-cookie} This works fine for the first request, but the second request is missing my un cookie. Any suggestions would be appreciated. Thanks Jennifer Ward - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cookie Manager Question
No, there is only one cookie manager in my test plan. The strange thing is that if I deselect Clear cookies each iteration then I end up with the following cookie for my second request: Cookie: un=${uname-cookie}; wosid=lI3iPzwi; woinst=3; un=123456; So, it's picking up the un cookie that I have stored in my cookie manager, but it's not resolving it. Thanks for your help. I'd appreciate any further suggestions you may have. Jennifer Ward On Apr 12, 2005, at 4:24 PM, sebb wrote: Have you got more than one cookie manager in the test plan? If so, you need to make sure that they are not both in scope at the same time, as only one will be actioned. You can do this by adding each as a child of the relevant sampler. S. On 4/12/05, Jennifer Ward [EMAIL PROTECTED] wrote: Hello All, I'm sending this again since it looks like my attachments got stripped out the first time. I'm using JMeter to test a login session that basically involves sending two requests. The first request sends a static Cookie (predefined in my CSV file). The response for that request includes some set-cookie headers that I want to use for the request #2. However, I also want to include my static Cookie from the first request as so: Request 1: GET /someurl Cookie: un=123456 Response: set-cookie: wosid=jGhVyqhtLM7s; version=1; path=/somepath set-cookie: woinst=1; version=1; path=/somepath Request 2: GET /someurl/login Cookie: un=123456; woinst=1; wosid= jGhVyqhtLM7s I've defined my test plan with the following User Parameters: username ${__CSVRead(...)} password ${__CSVRead(...)} uname-cookie ${__CSVRead(...)} Then, a header manager that defines the Cookie header using my static cookie: Cookie ${uname-cookie} Then, my cookie manager explicitly stores that cookie: un ${uname-cookie} This works fine for the first request, but the second request is missing my un cookie. Any suggestions would be appreciated. Thanks Jennifer Ward - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cookie Manager Question
On 4/13/05, Jennifer Ward [EMAIL PROTECTED] wrote: No, there is only one cookie manager in my test plan. The strange thing is that if I deselect Clear cookies each iteration then I end up with the following cookie for my second request: Cookie: un=${uname-cookie}; wosid=lI3iPzwi; woinst=3; un=123456; If a variable is not recognised, it is left as is. So either the variable is not defined, or the Cookie Manager is not processing variables at all. I now remember there was a bug for this: http://issues.eu.apache.org/bugzilla/show_bug.cgi?id=28715 So it's not possible at present to use variables in the Cookie Manager. Sorry, should have remembered that before... So, it's picking up the un cookie that I have stored in my cookie manager, but it's not resolving it. Thanks for your help. I'd appreciate any further suggestions you may have. Jennifer Ward On Apr 12, 2005, at 4:24 PM, sebb wrote: Have you got more than one cookie manager in the test plan? If so, you need to make sure that they are not both in scope at the same time, as only one will be actioned. You can do this by adding each as a child of the relevant sampler. S. On 4/12/05, Jennifer Ward [EMAIL PROTECTED] wrote: Hello All, I'm sending this again since it looks like my attachments got stripped out the first time. I'm using JMeter to test a login session that basically involves sending two requests. The first request sends a static Cookie (predefined in my CSV file). The response for that request includes some set-cookie headers that I want to use for the request #2. However, I also want to include my static Cookie from the first request as so: Request 1: GET /someurl Cookie: un=123456 Response: set-cookie: wosid=jGhVyqhtLM7s; version=1; path=/somepath set-cookie: woinst=1; version=1; path=/somepath Request 2: GET /someurl/login Cookie: un=123456; woinst=1; wosid= jGhVyqhtLM7s I've defined my test plan with the following User Parameters: username ${__CSVRead(...)} password ${__CSVRead(...)} uname-cookie ${__CSVRead(...)} Then, a header manager that defines the Cookie header using my static cookie: Cookie ${uname-cookie} Then, my cookie manager explicitly stores that cookie: un ${uname-cookie} This works fine for the first request, but the second request is missing my un cookie. Any suggestions would be appreciated. Thanks Jennifer Ward - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]