What Is Performance Testing?
Performance testing is the umbrella practice of measuring a system speed, responsiveness, and stability under various conditions.
Performance testing is the broad family that includes load, stress, soak, and spike testing. Its job is to answer non-functional questions: how fast, how many at once, for how long, and how does it behave at the edges. Where functional tests check correctness, performance tests check the qualities users feel even when everything technically works.
The performance testing family
- Load testing: behavior under expected traffic.
- Stress testing: behavior past the limit.
- Soak testing: behavior under sustained load over time.
- Spike testing: behavior under sudden surges.
Key metrics
Performance is measured with latency percentiles (p50, p95, p99), throughput (requests per second), error rate under load, and resource utilization. Tail latency matters more than averages, because the slowest requests shape the worst user experiences.
Setting targets
Performance testing is only meaningful against targets, often expressed as service level objectives, such as "p95 under 200ms at 500 requests per second." Without a target a number is just trivia; with one it becomes a pass-or-fail signal.
A quick example
A performance threshold makes the test fail automatically if tail latency exceeds the agreed target.
thresholds: {
http_req_duration: ["p(95)<200"], // p95 must stay under 200ms
}Performance testing in CI
Lighter performance checks can gate a pull request to catch regressions before they ship, while heavier runs go on a schedule. Reliable results depend on consistent hardware, so noisy or variable runners distort the numbers. Running performance jobs on fast, consistent runners keeps the comparison fair across builds.
Key takeaways
- Performance testing covers load, stress, soak, and spike testing.
- Measure tail-latency percentiles, throughput, and error rate.
- Test against explicit targets so results are pass-or-fail.