Run a load test
Send the same request many times at once and read the response-time spread.
In short
A load test sends the same saved request many times at once to see what happens under load: slowing answers, timeouts, rate limits and server errors. It runs in the background and reports throughput, the response-time spread and errors. Load testing is included in Pro, Business and Enterprise.
Before you start
- Who: starting a load test needs Edit on the project. Anyone who can open it reads results.
- Plan: load testing is part of the paid plans (Pro, Business and Enterprise); Plan & usage shows how many load tests you may run.
- First: save the request, make sure it works once, and use a test environment.
Steps
- Open "Test" › "Load tests" - or choose "Load test" in the project's … menu - and choose a saved request. Confirm it works once.
- Pick a preset or "Custom".
- Set "Timeout" and, if you want, "Retries".
- Press "Run load test". The test starts at once and the page follows it live; you can keep working.
Result: a summary in plain words, then the numbers below.
Load is real traffic Start on a test environment with small numbers, and make sure you are allowed to create the traffic before you test another organization's system. Requests go out from the {{brand}} server.
Read the results
Example: 500 requests at 20 callers gave median 180 ms, p95 520 ms, p99 4,700 ms. Half were quicker than 180 ms, but one in a hundred took about 25 times as long. A gap that size usually means contention, such as a lock, a connection pool or a cache that sometimes misses.
Look beyond the average Compare p95 and p99 with p50, and compare only runs that used the same request, environment and concurrency. A timeline that climbs with flat errors usually means queuing; flat time with rising errors means a limit is being hit.
Paced runs
A load test against a site nobody proved stays small and goes out at a steady rate, at most 10 requests a second. So it can never flood someone else's server. Its result is labeled paced. Anything over 10 callers or 1,000 requests needs a proved site; prove it from Settings, then Verified sites: /help/api-testing/quality-view#ownership-proof.
Good to know
- Closing the page does not stop a test; "Stop" does. A test that stops reporting for two minutes shows as interrupted.
- You can have one load test running at a time, and only one against the same site at a time.
- Ramp-up raises the number of callers gradually - up to five minutes.
- "Stop when the target struggles" ends a run early when most of the last answers are server errors or timeouts. For a site you did not prove it always applies.
- Every attempt is counted. A 429 answer is never retried, and it pauses the run for as long as the server's Retry-After asks (at most 60 seconds). Retries stay within a small budget.
- "Show all numbers" adds the median. A run shorter than two seconds is too short to plot; choose Soak or a Custom run of 10 seconds or more.
- What happens next: the result is kept below the form with who ran it, the load and the figures. Nobody is notified when it ends.
If something goes wrong
- The run was kept small and paced: the site is not proved. Prove it in Settings, Verified sites.
- Another load test is running: wait for it, or stop it.
- Every request timed out: that is still a result - the API did not cope with that load. Try fewer callers.
- "You have a load test running already. Wait for it to finish or stop it first."
- A message that begins "A load test is running against" means another test is already running against the same site. Try again when it has finished.
- "Concurrency must be between 1 and 100.": choose fewer callers. "Set either a total number of requests or a time to run for.": fill in only one of the two. "Total requests must be at most 20000.": lower the total.
- "The time to run for must be at most 300 seconds.": shorten the run. "The timeout must be between 1 and 120 seconds." and "Retries must be between 0 and 5.": keep inside those ranges.
- "This load test is not running.": it has already ended, so there is nothing to stop.
Related
- /help/api-testing/load-baselines
- /help/settings/webhooks-and-site-ownership
- /help/api-testing/time-bands