Integrate performance gates in CI
Expert190 pts~70 min
- CI/CD
- Performance gates
Practice app · Checkout Service
A load-testable checkout service with realistic latency that degrades under concurrency, plus a live metrics view.
Your starter code already declares BASE_URL — call the API relative to it.
Objective
Write a fast CI performance gate whose thresholds fail the pipeline on regressions.
Your task
- 1Set options { vus: 5, iterations: 50 }.
- 2thresholds: 'http_req_duration': [{ threshold: 'p(95)<600', abortOnFail: true }], 'http_req_failed': ['rate<0.01'], 'checks': ['rate>0.99'].
- 3GET BASE_URL + "/perf/checkout" with check status 200 and body status "confirmed".
- 4Keep the run under 20 s so it fits a pull-request pipeline.
Acceptance criteria
- GET /perf/checkout returns 200
- Latency, error and check thresholds are declared
- ≥ 50 requests with p95 < 800 ms and error rate < 1%
- At least 50 check() calls pass
k6 load testing · SDET · Scaling & analysis