0
votes

I am executing a login using a JMeter. While using a browser, I enter a web page address and it automatically redirects me to the login window.

If I execute the same GET request with the JMeter, it does not redirect me to the login window. After investigation I figure out that browser executes next requests when I enter web page address:

  1. GET webpage with 302 Redirect response
  2. GET login page with 200 OK response
  3. POST login page with 302 Found response
  4. GET login page with 200 OK response

When I use JMeter and execute GET request with follow redirect I get only: 1. GET webpage with 302 Redirect response 2. GET login page with 200 OK response

POST method is not automatically executed anymore. Is there an option in JMeter to follow POST methods or is it following only GET methods?

Thanks!

1

1 Answers

0
votes

In such tricky redirect cases just better to write a script with JMeter HTTP(S) Test Script Recorder, which by default is generating samplers for every HTTP request, including redirects. It`s just marking some with a comment "Detected the start of a redirect chain".

You just need to un-check both options "Redirect Automatically" and "Follow redirects" to fully control the flow.