Soak Test
ELI5 - The Vibe Check
A soak test is when you leave your app running under a steady, realistic load for hours or days instead of minutes, because some bugs only show up slowly. A memory leak might be invisible in a five-minute load test and completely obvious after twelve hours, like a slow leak in a tire that's fine on a short drive but flat by morning.
Real Talk
A soak test, also called an endurance test, runs a system under sustained, typically moderate load for an extended duration to detect issues that only manifest over time, such as memory leaks, resource exhaustion, connection pool starvation, or gradual performance degradation. It complements load and stress testing, which focus on peak capacity rather than long-term stability.
Show Me The Code
import http from 'k6/http';
import { sleep } from 'k6';
export const options = {
stages: [
{ duration: '5m', target: 50 }, // ramp up
{ duration: '12h', target: 50 }, // soak at steady load
{ duration: '5m', target: 0 }, // ramp down
],
};
export default function () {
http.get('https://myapp.com/api/health');
sleep(1);
}
When You'll Hear This
"The soak test caught a connection leak that a 10-minute load test would never have found." / "Run a 24-hour soak test before we trust this service in production."
Related Terms
Load Test
A load test is when you throw a huge crowd of fake users at your app to see how it handles them.
Memory Leak
A memory leak is when your program keeps grabbing more memory but never gives it back, like filling a bathtub without a drain.
Performance Test
Performance testing is measuring how FAST your app is under various conditions. Is the homepage loading in under 2 seconds?
Stress Test
A stress test pushes your app BEYOND its limits to see when and how it breaks. A load test checks normal traffic.