Detecting redirect loops

Hey,

I’ve written a test that exposes a redirect loop in our app at high load (great to know) but it makes the Gatling test run away…

SigninAuth Redirect 15626 OK=1 KO=0
SigninAuth Redirect 15627 OK=1 KO=0
SigninAuth Redirect 15628 OK=1 KO=0
SigninAuth Redirect 15629 OK=1 KO=0
SigninAuth Redirect 15630 OK=1 KO=0
SigninAuth Redirect 15631 OK=1 KO=0
SigninAuth Redirect 15632 OK=1 KO=0
SigninAuth Redirect 15633 OK=1 KO=0
SigninAuth Redirect 15634 OK=1 KO=0
SigninAuth Redirect 15635 OK=1 KO=0
SigninAuth Redirect 15636 OK=1 KO=0
SigninAuth Redirect 15637 OK=1 KO=0
SigninAuth Redirect 15638 OK=1 KO=0
SigninAuth Redirect 15639 OK=1 KO=0
SigninAuth Redirect 15640 OK=1 KO=0

Is there a way with 1.5.x to detect and kill this? I don’t want to globally disable follow redirects. Do you have an idea on doing something like, “If redirect more than n times, consider request failed”. If this is not possible in 1.5.x, I would sorely like it to become a feature in version 2.

Hi,

Sorry, we don’t have this feature yet, neither in Gatling 1 nor 2, but that’s a good idea.
I’ve raised an issue: https://github.com/excilys/gatling/issues/1361

Cheers,

Stéphane

Ah, yes. A configurable max redirect depth. I would recommend that is both a configuration item as well as something you can set programmatically. We have cases where system A redirects to system B and you want to measure responsetimes for both. Doing that is kinda hard if you can’t stop the tool from following HTTP 302 responses blindly.

Hi Floris,

What do you mean by programmatically vs configuration? Per scenario vs globally? Per request too?

Stéphane,

For my use case, I would need to set this per-request (similar to exitHereIfFailed). A global configuration would be a nice thing to have as well.

Rob

CONFIDENTIAL COMMUNICATION:
This email may contain confidential or legally privileged material, and is for the sole use of the intended recipient. Use or distribution by an unintended recipient is prohibited, and may be a violation of law. If you believe that you received this email in error, please do not read, forward, print or copy this email or any attachments.  Please delete the email and all attachments, and inform the sender that you have deleted the email and all attachments. Thank you.

Programmatically means changing the setting on a per-request basis as needed, or turning it off for a specified amount of time (until some condition becomes true, you reach a certain point in the script, etc)

Loadrunner has a lot features like that - turning checks on and off, adding headers automatically until being told not to, etc.

Logging is another topic that this applies to: Being able to say “log this, no matter what” or “turn off all logging” while the scenario runs (and I realize these two specific examples contradict each other) actually has a lot of value.

Just a follow up: maxRedirect has been pushed in master: support both on HttpProtocol and request.

This is excellent, thank you!

CONFIDENTIAL COMMUNICATION:
This email may contain confidential or legally privileged material, and is for the sole use of the intended recipient. Use or distribution by an unintended recipient is prohibited, and may be a violation of law. If you believe that you received this email in error, please do not read, forward, print or copy this email or any attachments.  Please delete the email and all attachments, and inform the sender that you have deleted the email and all attachments. Thank you.