Handle unexpected web redirects better
For our tests sometimes we may get some URLs wrong but GitLab will silently just redirect to the login page. This isn't captured by GPT as the redirect and subsequent login page returns a 200 so everything seems fine.
But unexpected redirects like this are actually failures as that means the test is unable to actually hit the page as expected. When it does happen it's made clear by the RPS rate being too high (as it counts double for the redirect and the login page):
* Environment: 10k
* Environment Version: 13.1.0-pre `18596bcd717`
* Option: 60s_200rps
* Date: 2020-06-05
* Run Time: 1h 28.87s (Start: 01:24:55 UTC, End: 02:25:24 UTC)
* GPT Version: v2.0.0
NAME | RPS | RPS RESULT | TTFB AVG | TTFB P90 | REQ STATUS | RESULT
---------------------------------------------------------|-------|----------------------|------------|-----------------------|-----------------|--------
web_project_file_blame | 20/s | 39.3/s (>0.80/s) | 40.03ms | 55.16ms (<20000ms) | 100.00% (>95%) | Passed
web_project_merge_request_changes | 20/s | 29.32/s (>8.00/s) | 407.28ms | 1864.42ms (<4000ms) | 100.00% (>95%) | Passed
We previously had redirects off globally in k6 but had to reenable to do our dash URL checks. k6 though does appear to have an specific option to disallow redirects on specific calls. We should use this in our Web tests to capture unintended redirects.
Edited by Grant Young