Load Testing · Junior · Question 21 of 75
A k6 run has 30% failed checks but no thresholds. What exit code does k6 return?
- 1Non-zero: any failed check fails the whole run
- 2Non-zero only if more than half of the checks failed
- 3Zero: failed checks alone don't fail the run
Show the answer
Correct answer: Zero: failed checks alone don't fail the run
Explanation
Checks only record results. To fail the run on checks, add a threshold on the checks metric, e.g. checks: ['rate>0.99'].