1. Preparing #
A test without an objective proves nothing.
Before running #
- Define the objective (SLO, target throughput, peak date) and the type of test.
- Model real traffic: journey mix, think times, varied data.
- Test a representative (size, data, configuration) and isolated environment.
- Warn the teams and providers (CDN, third-party APIs, WAF).
2. Running and observing #
Measuring on both sides.
During the test #
- Start with a smoke test, then ramp up gradually.
- Monitor the test machine (CPU, network) and
dropped_iterations. - Export k6 metrics with a
testidand display them next to those of the system under test. - Note events (scaling, restarts) during the test.
3. Automating #
Performance as a test like any other.
Continuously #
- Thresholds aligned with SLOs, blocking in CI.
- Smoke on every pull request, load every night.
- Scripts versioned and reviewed with the code.
- Result history to detect slow regressions.
Common mistake: Never compare two tests run on different environments: environment variation often exceeds the effect of the change being tested.
Reference diagram and quick check #
Checklist.
Checklist #
- Quantified objective and test type chosen
- Realistic scenarios and varied data
- Thresholds aligned with SLOs
- k6 and system-under-test metrics on the same dashboard
- Test automated in CI
- Report with conclusions and actions
