Using k6 Thresholds as Performance Gates in CI/CD
Turn k6 load-test metrics into CI/CD pass/fail gates using Thresholds on aggregated metrics like p(95) latency and error rate.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Turn k6 load-test metrics into CI/CD pass/fail gates using Thresholds on aggregated metrics like p(95) latency and error rate.
A diagnostic guide for k6 load testing threshold failures, covering common causes, ordered checks, fixes tied to findings, and escalation criteria.
k6 thresholds turn load test output into automated pass/fail gates. Learn how to scope them by tag, use abortOnFail, and verify exit codes in CI.
Load unique test data from an external CSV into k6 using open() and SharedArray so each virtual user sends different credentials or payloads.
k6 can generate rich metrics, but without thresholds and checks your CI pipeline has no verdict. Learn to encode latency SLOs and correctness assertions as executable pass/fail criteria.
Learn when to use k6 thresholds versus custom checks for pass/fail criteria, see a side‑by‑side comparison, and walk through a combined example that validates JSON responses and enforces latency SLAs.
Learn how to configure k6 thresholds to enforce performance budgets in CI/CD, avoid flaky failures, and catch latency regressions before merge.
Learn how to add k6 thresholds for HTTP latency and error‑rate SLAs, run the test, interpret the pass/fail output, and recover when a threshold is violated.
Use k6 thresholds as CI pass/fail gates for load tests. Define latency and check criteria, fail builds on non-zero exit, and sanitize artifacts.