What Is Load Testing? Load, Stress and Performance Testing Explained
Load testing measures how a website, application or API behaves when many people use it at the same time. It shows how many concurrent users your system can handle before response times climb or errors appear, so you can fix bottlenecks before your visitors find them.
At a glance
- Load testing: simulates the expected number of concurrent users to check that response times and error rates stay within targets.
- Stress testing: pushes beyond the expected load to find the breaking point and see how the system fails and recovers.
- Performance testing: the umbrella term for all tests of speed, scalability and stability, including load, stress, spike, soak and single-user speed tests.
- Key metrics: response time (average and 95th percentile), throughput (requests or transactions per second), error rate and server resource usage.
- When: before launches, marketing campaigns, seasonal peaks and major releases, and after infrastructure changes.
Load testing definition
Load testing is a type of performance testing in which a system is put under a realistic, controlled amount of simultaneous use, measured in virtual users, requests per second or transactions per second, while its response times, error rates and resource usage are recorded. The goal is to confirm that the system meets its performance targets at the expected peak load and to find the components that limit it.
Load testing vs. stress testing vs. performance testing
| Load testing | Stress testing | Performance testing | |
|---|---|---|---|
| Question | Does it hold up at the expected peak? | Where does it break, and how does it recover? | How fast, scalable and stable is it overall? |
| Load level | Normal to peak | Beyond peak, until failure | From one user up to beyond peak |
| Typical result | Response times and errors at peak load | Breaking point, failure mode, recovery time | A full performance profile |
| Relationship | A type of performance testing | A type of performance testing | The umbrella category |
Types of performance tests
- Load test: ramps up to the expected number of users and holds it.
- Stress test: keeps increasing the load until the system fails.
- Spike test: jumps suddenly from low to very high load, as after a TV ad or a product drop.
- Soak (endurance) test: holds a steady load for hours to reveal memory leaks and slow degradation.
- Scalability test: increases load step by step to see whether adding servers increases capacity.
- Single-user speed test: measures how fast a page loads for one visitor, for example with the Website Speed Test.
How to run a load test
- Set goals: for example, "the checkout completes in under 3 seconds for 95% of users at 2,000 concurrent users with less than 1% errors".
- Choose user journeys: script what real users do, such as browse, search, log in and check out, not only the home page.
- Pick the load profile: decide the number of virtual users, the ramp-up time, the duration and the regions the traffic comes from.
- Prepare the environment: test production or a production-sized copy, warn your hosting and CDN providers, and make sure test data such as accounts and orders can be created safely.
- Run and watch: increase the load gradually while monitoring response times, errors and server CPU, memory, database and network.
- Analyze and fix: find the first component to saturate, fix it, and run the test again.
Load testing metrics to watch
- Response time: average and 95th or 99th percentile; percentiles show what the slowest users experience.
- Throughput: requests or transactions per second the system completes.
- Error rate: the share of requests that fail or time out.
- Concurrent users: how many virtual users are active at each point.
- Resource usage: CPU, memory, database connections and bandwidth on each server.
The point where response times start rising faster than the load, or errors appear, is your practical capacity.
Protocol-level vs. real-browser load testing
Protocol-level tools such as Apache JMeter, k6 and Gatling send HTTP requests directly, which is efficient for APIs and back-end capacity. Real-browser load testing runs actual browsers, so it also measures JavaScript, rendering and third-party content the way users experience it, and it handles complex single-page applications without hand-written request scripts. LoadView, from the makers of Dotcom-Tools, runs real-browser and API load tests from a managed cloud, with no load generators to set up.
Before you load test
Make sure the site is fast for a single user first; a slow page only gets slower under load.
- Website Speed Test: page load time, Core Web Vitals and a waterfall from several locations.
- Web Server Test: server and API response time.
- Web Application Testing Tools: which tools to use for each type of testing.
Frequently asked questions
What is load testing?
Load testing is a type of performance testing that simulates many concurrent users on a website, application or API to check that response times and error rates stay acceptable at the expected peak, and to find the bottleneck that limits capacity.
What is the difference between load testing and stress testing?
Load testing checks behavior at the expected peak load. Stress testing goes beyond it, until the system fails, to find the breaking point and see how the system fails and recovers.
What is performance testing?
Performance testing is the umbrella term for testing a system's speed, scalability and stability. It includes load, stress, spike, soak and scalability tests, as well as single-user speed tests.
Why is load testing important?
Because many failures only appear under concurrent use: database locks, exhausted connection pools, slow queries and saturated servers. Load testing finds them before a launch or traffic peak instead of during it.
How many users should a load test simulate?
Start from your analytics: take the highest number of concurrent users you have seen or expect, add a safety margin of 20–50%, and test that. Then run a stress test above it to know your headroom.
Which tools are used for load testing?
Popular options are Apache JMeter, k6 and Gatling for protocol-level tests, and cloud services such as LoadView for real-browser and API load testing without managing load generators.
Can I load test my website for free?
Open-source tools such as JMeter and k6 are free but need your own load-generating machines. The Dotcom-Tools tests are free but measure one visitor per location, not load. LoadView offers a free trial for cloud load tests.
Last updated: