A single run cannot answer every performance question: a system may hold a steady flow for hours and fall over under a short spike, or degrade slowly and only by the third day of running. That is why load is applied in different shapes, and each type looks for its own defects.
Four types and what they are for
The shape of a load is described by three parameters: the target level (how many virtual users or requests per second), the ramp-up speed and the hold time.
| Type | Load shape | Duration | What we look for |
|---|---|---|---|
| load | average production load | 5–60 minutes | whether the system handles an ordinary day without degradation |
| stress | above average, sometimes 50–100% or more | 5–60 minutes | how the system degrades and whether it survives overload |
| soak | average, as in a load test | hours to days | memory leaks, growing response times, exhausted connections |
| spike | sharp ramp to a peak and back down | minutes | whether it withstands a sudden surge and returns to normal operation |
Classifications differ in what they include: the k6 documentation adds smoke and breakpoint tests to these four, and the ISTQB syllabus calls the long-running type endurance. There is no single vocabulary, and the boundaries are fuzzy: a stress test for one application is ordinary load for another.
How to choose the order
The k6 documentation advises going from safe to heavy: first make sure the script works under a small load, then check the expected level, and only then raise the load above average. Stress and spike tests create real overload, so run them on an environment comparable to production and watch server resources — otherwise it is hard to tell why the system slowed down. The choice of types is guided by the system’s risks: seasonal sales, peak hours, a requirement to run for days without a restart.
- load — the baseline: the system handles the expected load without degradation;
- stress — if a surge above normal is expected or you need spare capacity;
- spike — if load arrives suddenly: a sale, a release, a news surge;
- soak — before periods when the system has to run for days without a restart.
Profiles in k6
In a k6 script the shape of the load is set by the stages array: ramp-up, plateau and ramp-down steps. A spike test has no plateau — the climb to the peak is almost instant, and there is no need to hold it for long.
export const options = { stages: [ { duration: '2m', target: 2000 }, // sharp ramp to the peak { duration: '1m', target: 0 }, // quick ramp-down ],};Sources
the term is written from these pagesVerified 9 Nov