Endurance testing

Endurance testing, also called soak testing, runs a software system under a steady, realistic load for a long period, often many hours or days, to expose problems that short tests never reach. Memory leaks, exhausted connection pools, growing log files and slowly degrading response times appear only after sustained running.

The longer version

The term belongs to software performance work and has nothing to do with athletic stamina. The load is ordinary, close to what a load test applies, and the variable is time. A system that handles an hour of expected traffic cleanly can still run out of memory on day two because each request leaves a little behind, or can slow down as a table grows and an index stops helping.

The measurements are trends, not single numbers. Memory and open-handle counts over time, garbage collection pauses, disk usage, database connections in use and the response-time percentile are plotted across the run. A flat line passes. A slope is what the run is there to catch, even when the system is still fast, because a slow climb that reaches the ceiling in nine days ends in a production outage.

Duration is chosen to cover real cycles. Nightly batch jobs, token and certificate expiry, cache lifetimes, log rotation and scheduled backups all happen on a clock, and a thirty-minute run cannot see any of them. A run that spans those cycles also needs a quiet system to start from, since another team's batch job on the same database muddies the trend.

The run itself has five steps. Pass the smoke test and the average-load test first, because a soak that fails in its first hour is a load test problem and wastes the day. Reuse the load test script, so the only variable that changes is time. Ramp up to the average load, not the peak, hold that plateau for the planned duration, then ramp down. Record a baseline of every resource metric during the first hour and compare each later hour against it. Grafana's k6 documentation lists typical soak durations of 3, 4, 8, 12, 24 and 48 to 72 hours, and its own example holds 100 virtual users for 8 hours between 5 minute ramps. Any load tool that can hold a plateau for that long will do, k6, Apache JMeter, Gatling and Locust among them; what decides the result is the monitoring on the server side. A passing run shows heap memory that rises and falls back to the same floor after each garbage collection, a connection pool that returns to its idle size, and a p95 latency that is the same in hour eight as in hour one. A failing run shows that floor rising hour on hour, even while every response is still within its target.

Common questions

What is endurance testing in software?

Endurance testing is a performance test that applies a steady, realistic load for a long time, often hours or days, to find defects that only appear after sustained operation, such as memory leaks and gradual slowdowns.

Is endurance testing the same as soak testing?

Soak testing is the common alternative name for the same practice, with the system soaked in load over a long period. Some teams use the two names interchangeably and a few reserve soak for the longest runs.

How long should an endurance test run?

An endurance test should run long enough to cover the system's own cycles, so at least one pass of every scheduled job, cache expiry and log rotation. Many teams run overnight or over a weekend, and the right length is the one that would have shown the slowest leak they have seen before.

What does an endurance test usually find?

An endurance test usually finds memory and resource leaks, connection pools that are never returned, disk filling with logs or temporary files, and performance that degrades as data accumulates. Each shows up as a trend line that moves in one direction.

How does endurance testing relate to load testing?

An endurance test often reuses the load test's scripts and load level and extends the duration. The load test confirms the system copes at that volume for a short period, and the endurance run checks that it still does later.

What is the difference between endurance, load and stress testing?

Each one changes a different variable. A load test applies the expected volume for an hour or two and asks whether the system copes. A stress test pushes the volume past the expected peak and asks where and how it breaks. An endurance test keeps the expected volume and stretches the time, and asks whether the system is still healthy hours or days later.

What should you monitor during an endurance test?

Memory after each garbage collection, open file handles and sockets, database connections in use against the pool size, thread counts, queue depth, disk usage, error rate and the p95 and p99 response times. Plot each one across the whole run. A metric that returns to the same level after every cycle passes; one with a steady upward slope is the defect the run was there to find.

Which tools are used for endurance testing?

The same tools that run load tests: k6, Apache JMeter, Gatling and Locust are the common open source choices, and each can hold a constant load for hours. The load tool only drives traffic, so the run also needs server-side monitoring, an APM or metrics stack that keeps the full time series for memory, connections and latency rather than a summary at the end.

Bug reports that arrive ready to triage.

Collect replay, console, network and browser context with the Free plan.

<script src="…/widget.js" data-key="pb_pub_…">