Ignoring redirects, consequenses?

I have to test a fairly complex web-site.
I have experimented with the recorder and I hav turned on/off the option ignore-redirects.
Turning it, what is the consequences? I guess one could say that this is not a “real” test as it does not follow redirects or could one better understand this assuming that redirects often involves calling third party sites and that way is not very important to include in load testing?
Generally, why do we need redirects?

Turning it, what is the consequences? I guess one could say that this is not a “real” test as it does not follow redirects or could one better understand this assuming that redirects often involves calling third party sites and that way is not very important to include in load testing?

From http://gatling.io/docs/2.0.3/http/http_check.html#http-check : “By default, Gatling follows redirects (can be disabled in the protocol). If this behavior is enabled, checks will ignore intermediate responses and will target the landing response.”

Generally, why do we need redirects?

To my mind redirects are used essentially for old pages and facilitates user navigation to new resources. If you’re in this case (and you’re not redirecting to an external web site) it seems to be suitable to bench those links, am I wrong ?

Hi Magnus,

Well, you don’t even need to call third party sites to have some redirections.
One very common place where you can find redirections is a login phase :

  1. You go the login page
  2. You submit user/password to the page that will check your credentials and log you in or not
  3. Whether your login was successful or not, you get redirected, for example, to the home page to try to log in again or your account page if successful.

In Gatling, the consequence of not following redirects is that Gatling will not handle the redirection itself, eg. if you go to page A which redirect you to page B :

  • with follow redirect ON, when hitting page A, which answers with a status code corresponding to redirections (3xx) and the location of B, Gatling would automatically get to B.
  • with follow redirect OFF, when you hit page A, you would only see that its reponse code corresponds to a redirection (3xx), but you would need to add manually in your scenario a request to hit page B.
    Hope this helps :slight_smile:

Cheers,

Pierre