“How many users can the site handle?” sounds like a simple question, but it has no answer until you say what “handle” means. Is a 6-second page acceptable? Is 2% of failed checkouts acceptable? A capacity test starts by fixing those limits, then increases the load until one of them is crossed. The load at that point is the capacity.
Capacity test vs stress test
The two look alike, since both increase the load, but they answer different questions:
| Capacity test | Stress test | |
|---|---|---|
| Stops at | The first limit you set is crossed | The site fails |
| Result | The most users within your limits | The breaking point and how the site fails |
| Used for | Planning: campaigns, hardware, plans | Knowing your headroom and failure mode |
A site can still be up at 400 users and yet have its capacity at 240, because from 240 on its pages take longer than you accept. Load testing vs stress testing covers the stress side.
Set the limits first
Typical limits for a website or online shop:
- Page load time: an average under 3 seconds, or 95% of pages under 5 seconds.
- Errors: under 1% of requests or journeys failing.
- Key journeys: the checkout completes for every test user.
Pick limits you would accept on the busiest day of the year, not on a quiet afternoon.
From visitors to simultaneous users
Analytics usually show visitors per hour or per day, but a capacity test measures users on the site at the same moment. The two are linked by how long a visit lasts (Little’s law):
simultaneous users = visitors per hour × average visit length in hours
A campaign that brings 3,000 visitors in its busiest hour, with visits of about four minutes, puts about 3,000 × 4/60 = 200 users on the site at once. Add headroom for the busiest minutes within that hour, often 1.5 to 2 times, and the capacity you need is 300 to 400 simultaneous users.
How to run a capacity test
- Write down the limits and the target capacity from the arithmetic above.
- Use realistic users. Real browsers that load whole pages, with journeys through search, product pages and the cart.
- Increase the load gradually so you can see where the limit is crossed, not only that it was.
- Stop at the first limit crossed and record the load. That is the capacity.
- Find what limited it in the slowest pages and the server’s logs, fix one thing, and run the same test again. The new number shows whether the fix helped.
Capacity and scalability testing
A scalability test asks how capacity changes when you add resources: if you double the servers, do you get twice the users? Often not. When the bottleneck is a database query or a shared cache, more web servers add little. A scalability test runs the same capacity test on different setups and compares the numbers, which tells you whether to spend on hardware or on code.
With Supervisor
An automatic Supervisor test is a capacity test. It starts with 4 users and adds users every 10 seconds until your target holds, and stops earlier when the average page load passes your limit, 3 seconds by default and adjustable from 1 to 10, or when 20% or more of the browsers fail. The result is one number, how many users the site handled, with the slowest pages, server time and browser time behind it.
Run the same test after every change and compare the number. A scheduled test does this daily, weekly or monthly and emails you when the site no longer reaches the target. The first test with 4 users is free; after that a test costs 1 credit per 10 users.