Mid-LevelPerformance & Load Testing
How do you integrate performance tests into a CI/CD pipeline?
- CI/CD
- performance regression
- automated testing
Answer it first, then compare. Nothing here is saved or scored.
Model answer
Use lightweight performance tests (not full load tests) in CI: (1) Run a small-scale load test (50-100 VUs for 2 minutes) against a dedicated perf environment. (2) Assert thresholds in the script, k6 `thresholds` fail the test if p95 > X ms. (3) Fail the pipeline if thresholds are breached. (4) Store results (InfluxDB + Grafana) for trend analysis over time. (5) Run full-scale load tests on a schedule (nightly or pre-release) rather than on every commit. Keep CI fast, catch regressions automatically.
What interviewers listen for
- Workload modellingYou design the load shape from product traffic, not from tool defaults.
- Percentile literacyYou read p50/p95/p99 separately and explain why each matters.
- Bottleneck triageYou correlate metrics across application, database, and infrastructure layers.
- Capacity instinctsYou can translate a soak test into a sizing or scaling recommendation.