Overview
A comprehensive load testing strategy requires more than just executing a single script. Different patterns of traffic create different risk profiles for your application. Each test type serves a specific purpose in validating your system’s performance.Smoke Tests
Validate scripts and basic functionality with minimal load
Load Tests
Assess performance under typical production conditions
Stress Tests
Test system limits under extreme conditions
Spike Tests
Validate behavior during sudden traffic surges
Soak Tests
Check reliability over extended periods
Breakpoint Tests
Find system capacity limits
Smoke Tests
Smoke tests use minimal load to verify that your test script works correctly and the system responds without errors. When to run: Every time you create or modify a test script, or when application code changes. Configuration:- 2-5 virtual users
- 30 seconds to 3 minutes duration
- Minimal iterations
Always run smoke tests before executing larger test types. Fix any errors before proceeding.
Load Tests
Average-load tests (or “load tests”) assess how your system performs under typical, expected traffic conditions. When to run: Regularly, to verify the system maintains performance standards under normal production load. Configuration:- Gradual ramp-up (5-15% of total duration)
- Sustained load period (5x longer than ramp-up)
- Optional ramp-down period
Stress Tests
Stress tests assess system performance when loads exceed the expected average, testing stability under heavy use. When to run: After average-load tests pass, to verify the system handles peak traffic periods (rush hours, deadlines, end-of-week). Configuration:- Load 50-100%+ above average (or more, depending on risk)
- Longer ramp-up period
- Extended plateau duration
Spike Tests
Spike tests verify whether the system survives sudden and massive rushes of traffic with little to no ramp-up time. When to run: When the system may experience events like ticket sales, product launches, broadcast ads, or seasonal sales. Configuration:- Very fast or no ramp-up
- Extremely high load
- Brief or no plateau
- Fast ramp-down
Spike tests often reveal errors. Run, tune, and repeat until the system can handle the load.
Soak Tests
Soak tests (also called endurance tests) verify the system’s reliability and performance over extended periods. When to run: After other test types pass, to check for degradation issues that only appear after prolonged use. Configuration:- Average load levels
- Extended duration (3-72 hours)
- Same ramp-up/down as load tests
Breakpoint Tests
Breakpoint tests gradually increase load to identify the system’s capacity limits and breaking points. When to run: Periodically, to understand the upper limits of your system’s capacity. Configuration:- Continuous load increase
- Runs until failure or unacceptable performance
- No plateau period
Test Type Comparison
| Test Type | Load Level | Duration | Primary Goal |
|---|---|---|---|
| Smoke | Minimal (2-5 VUs) | Short (1-3 min) | Verify script and basic functionality |
| Load | Average production | Medium (5-60 min) | Assess normal performance |
| Stress | Above average | Medium (5-60 min) | Test high-load stability |
| Spike | Very high | Short (few min) | Validate surge handling |
| Soak | Average | Long (hours/days) | Check prolonged reliability |
| Breakpoint | Increasing | Until failure | Find capacity limits |
Best Practices
Start with smoke tests
Always begin with smoke tests to validate your scripts and establish baseline performance before running larger tests.
Progress gradually
Move from smoke → load → stress → soak. Don’t skip test types or you may miss critical issues.
Keep designs simple
Use simple load patterns: ramp-up, plateau, ramp-down. Avoid complex “rollercoaster” patterns that waste resources and make issues hard to isolate.
Customize to your context
Adapt test configurations to your specific risk profile. A stress test for one system may be a load test for another.
Modeling Workload
k6 provides two ways to model load: Virtual Users (VUs): Simulate concurrent usersNo single test type eliminates all risk. Use multiple test types to assess different failure modes and build confidence in your system’s reliability.