Search GimmeJob

Type at least 2 characters. Enter also searches by meaning.
QA interview question
Performance & resilienceMiddleCommonTooling

What are k6 thresholds, and how do they help automate performance testing?

Answer

k6 thresholds are explicit pass/fail conditions over metrics, for example a maximum error rate and p95 or p99 response-time limit. A breached threshold makes the run fail, so a performance objective or SLO can become an automated quality gate rather than a graph someone must inspect manually. Thresholds should come from real requirements or an agreed baseline, not arbitrary numbers chosen to make CI green.

Strong answer includes

  • defines thresholds as metric pass/fail criteria
  • uses percentile latency and error-rate examples
  • derives limits from SLOs, requirements or a controlled baseline

Practical example

A checkout gate might require `http_req_failed` below 1% and `p(95)` under the agreed latency budget. The pipeline then fails automatically if either objective is breached.

#k6#thresholds#slo#ci-cd#p95#error-rate

Sources

Performance Testing Interview Questions: JMeter, k6 & LoadRunner (2026)SoftwareTestPilot · Current recurrence signal for load versus stress, performance metrics, JMeter, k6, correlation, CI/CD, baselines and bottleneck analysisGrafana k6 documentation — ThresholdsGrafana Labs · Technical authority for percentile/error-rate pass-fail criteria, SLO encoding and automated performance gates