I am attempting to Login to my app with JMeter Script.
I have Cookie Manager and a Cache Manager added
My Thread Group script
- GET on main login page (/app) to return session id and form fields and cookie
- POST of completed form fields with cookie (/posthandler) with "follow redirects
What happens is
- POST sends initial cookie (from GET) and form fields and logs in ok
- the session is established (I see a record in our app database)
- the response is a redirect with a new cookie
- JMeter redirects (GET) to the session url (/app?session=xxxxx)
- this goes with "[no cookies]" (according to request panel)
- As that request arrives without the new cookies - the app issues a second redirect back to the login page.
So is there a way to force the GET Redirect after the POST response to send the cookie?
My theory is that JMeter is that, because of the different URI path for the POST and redirect GET, JMeter is not sending the cookie.
I have tried
- various Cookie Manager settings (standard, default, compatibility).
- followed this Understanding and Using JMeter Cookie Manager and set check.cookies=false.
- and advice SO - JMeter: Login flow involving URL redirection not working including making sure there was an init