Reputation: 43
I'm making log in test in JMeter and i have a problem. I made a HTTP Request as a POST method and it works - I get a JavaScript response (new popup). So the next step is another HTTP Request which return the page after log in. But instead of getting this page in return, I got another page which informs that session doesn't exist. What is wrong?
Upvotes: 1
Views: 713
Reputation: 1
I have the same issue. The authentication cookie was not sent and the request body shows "unauthenticated_session=deleted" under Cookie Data instead of the token values. I resolved it by adding additional forward slashes in path by trial and error method. Some endpoints (javascript based http requests) work with // and some with /// or ////. Weird but works for me.
Upvotes: 0
Reputation: 43
Thanks!! It helps with log in but I have simmilar problem going further. After log in I can see a desktop with some icons. Clicking on one of this icon open a PopUp in JavaScript. I looked at POST methods - one of them has a JS code which open this PopUp as a POST response. I added it to my Test Plan. But instead of getting a js response like " new Window ({...." I receive object.SessionTimeOutAlert()". I think that this is a common problem. But now I have HTTP Header Manager and HTTP Cookie Manager and nothing....
Upvotes: 0
Reputation: 168082
Make sure you detect and handle all dynamic parameters in some cases for security or state management or whatever server expects some extra parameters in addition to credentials and in case of missing or mismatch with expected logic can fail. So the test should look like:
See How To Use JMeter For Login Authentication guide for more detailed explanation and example.
Upvotes: 1
Reputation: 1200
Add HTTP Header Manager and HTTP Cookie Manager to your test plan. Session IDs needs to be managed.
Upvotes: 0