Bookmarks

Types of load testing

load, stress, soak, spike testing

A set of performance testing types in which the system is tested under different shapes of load: steady, raised, prolonged and peak.

Also: load test types, stress testing, soak testing, endurance testing, spike testing

checked 9 Nov

All terms

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.

TypeLoad shapeDurationWhat we look for
loadaverage production load5–60 minuteswhether the system handles an ordinary day without degradation
stressabove average, sometimes 50–100% or more5–60 minuteshow the system degrades and whether it survives overload
soakaverage, as in a load testhours to daysmemory leaks, growing response times, exhausted connections
spikesharp ramp to a peak and back downminuteswhether 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.

javascriptspike test: a peak and a quick ramp-down
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 pages

Verified 9 Nov

Not to be confused with

what it is mixed up with and how it differs

  • smoke test

    A smoke test checks that the script and the system work under minimal load, while these types check how the system handles expected, raised and peak load.

In depth in the references

where the topic is covered in detail