20% of checks failed, but k6 still exited with code 0 and CI passed.
BeginnerTroubleshootingk6 Load Testing
Answer
Likely causes → check() only records results; it does not fail the test. Only thresholds affect the exit code.
Diagnose → Look at the summary: checks.........: 80.00% with no threshold listed.
Fix → Add a threshold on checks:
thresholds: { checks: ['rate>0.99'] }
Prevent → Template scripts with SLO thresholds on http_req_failed, http_req_duration and checks.
More on k6 Load Testing
k6 prints `WARN[0030] Insufficient VUs, reached 100 active VUs and cannot initialize more executor=constant-arrival-rate scenario=steady`.AdvancedCI fails with `ERRO[0602] thresholds on metrics 'http_req_duration' have been crossed` and exit code 99.BeginnerEvery request fails with `dial tcp: lookup checkout on 10.96.0.10:53: no such host`.BeginnerMany requests fail with `request timeout` after exactly 60 seconds.IntermediateThe test starts fine, then errors switch to `dial tcp 10.96.41.12:8080: connect: connection refused`.IntermediateThe k6 load generator logs `socket: too many open files`.Intermediate