What Is Load Testing? A Practical Guide with Examples

load testing

Load testing shows whether your app, API, or service holds up at the traffic you expect, before your users find out. This guide covers goals, workload models, load profiles, the metrics that matter, and a worked example with a plan you can reuse.

Key takeaways
The 30-second version of this article
Load testing checks that a system meets its service level objectives at expected and peak traffic. It is not about finding the breaking point.
Results are only as good as the workload model. Base user journeys, traffic mix, think time, and test data on production data, and test in a production-like environment.
Set targets on p95 and p99 latency, and read them with error rate and throughput. Flat throughput as load rises means the system has stopped scaling.
Use a ramp-hold-ramp profile and read the hold period most closely. Starting every user at once is a spike test.
In CI/CD, run a short smoke load test on every merge, an average load test regularly, and a full peak test before major releases.

Load testing is a type of performance testing that puts a system under the traffic you expect, including your normal peak, and measures how it responds. You simulate many concurrent users or requests against a web app, API, or service, then check response times, throughput, error rate, and resource use against targets you agreed on before the run.

The goal is not to break anything. A load test answers a narrower question: will this release meet its service level objectives on the busiest day we expect? This guide covers how to plan, run, and read one, with an example you can adapt.

What is load testing?

A load test runs a realistic mix of user actions at a defined level of traffic for a set period of time. While it runs, you record how fast the system responds, how much work it completes, how often it fails, and how hard its servers, databases, and queues are working.

Load testing tells you:

  • Whether response times stay within target at expected and peak traffic
  • How many requests or transactions per second the system completes before it stops scaling
  • Which component saturates first: the app servers, the database, a connection pool, a cache, or a third-party call
  • Whether the system stays stable across a full peak period, not just the first few minutes

It sits inside a wider family of performance tests. Stress testing pushes past expected traffic to find the breaking point, spike testing applies sudden surges, soak testing holds load for hours, and volume testing loads the database with large data sets. If you want the side-by-side view, see our guide to load vs stress vs performance testing.

Types of load tests

Most teams run a few variations, each with a different traffic level and purpose:

Type

Traffic level

Question it answers

Baseline test

Low, steady load

What does "normal" look like for this build?

Average load test

Typical daily traffic

Does the system meet its targets on an ordinary day?

Peak load test

Your busiest expected hour, often with headroom

Will it hold up on the busiest day of the month or year?

Soak test

Typical load for several hours

Do memory leaks, connection leaks, or growing queues appear over time?

The baseline matters more than it looks. Without one, you cannot tell whether a 700 ms response time is a regression or simply how this endpoint has always behaved. For long-duration runs, our soak testing guide covers what to watch over hours rather than minutes.

Why load testing matters

Functional tests tell you a feature works for one user. Load testing tells you it still works for everyone at once. It catches problems that rarely show up any other way: a database connection pool that runs dry at a few hundred concurrent users, a slow query that only hurts when it runs in parallel, a cache that misses under real data volumes, or an autoscaling rule that reacts too late.

It also gives you evidence for capacity decisions: how many instances to run, which component to scale first, and whether a change helped.

How to perform load testing, step by step

The planning steps take longer than the run itself, and they decide whether the results mean anything.

1. Set goals from production data

Start from real traffic, not guesses. Pull your busiest periods from analytics, logs, or APM data and note:

  • Peak concurrent users or sessions
  • Peak requests per second, broken down by endpoint
  • Which user journeys drive that traffic

Then agree on pass or fail targets with the product owner. Write them as service level objectives based on percentiles, not averages. The Google SRE book's chapter on SLOs explains why: averages hide the slow tail of requests that real users feel. For example, a target might read "p95 under 1 second and error rate under 0.5% at peak load."

2. Build the workload model

The workload model describes what your virtual users do. If it does not match real behavior, the numbers will not match real performance.

A good workload model covers:

  • User journeys: the main paths users take, such as sign in, search, create a record, or export a report
  • Mix percentages: how traffic splits across those journeys, taken from production data
  • Think time: the pause between actions while a real person reads or types
  • Pacing: how often each virtual user starts a new journey
  • Test data: enough unique users, records, and search terms that caches behave the way they do in production

Decide whether to model users or arrivals. A closed model fixes the number of virtual users; an open model fixes the rate at which new requests arrive, regardless of how slow the system gets. Public-facing traffic usually behaves like an open model. The k6 guide to open and closed models explains the difference and why it changes your results.

3. Prepare a production-like environment

Run the test somewhere that behaves like production: the same instance sizes, configuration, and realistic data volume. A staging database with a fraction of production data makes queries look fast and hides the bottlenecks you are looking for.

Also check the load generators. Run them from separate machines (never on the servers under test), in a network location that reflects where your users are, and monitor their own CPU and network. If a load generator saturates, the slow responses you record are its problem, not your system's.

4. Choose a load profile

The load profile is how traffic changes over the course of the test. The standard shape is ramp, hold, ramp:

  • Ramp up gradually to the target load, so you can see where metrics start to bend
  • Hold at the target long enough for caches, pools, and autoscaling to settle
  • Ramp down and confirm the system recovers to its baseline

Starting every user at once is a spike test, not a load test. Read the hold period most closely; that is where the system shows its steady-state behavior at peak.

5. Run the test and watch the system

During the run, collect two sets of data side by side: what the load tool reports (response times, throughput, errors) and what the system reports (CPU, memory, database connections, queue depth, garbage collection). The first tells you something is slow. The second tells you why.

Keep a short run log of build version, configuration, and anything unusual.

6. Analyze, fix, and re-test

Compare results to your targets, find the first resource to saturate, fix it, and rerun the same test, changing one thing per run. A load test that only runs once is a snapshot; a load test that runs on every release is a trend line.

The metrics that matter

These are the metrics that drive decisions:

  • Latency percentiles: p50 is the median, p95 is the time 95% of requests finish within, and p99 covers all but the slowest 1%. Set targets on p95 and p99, and track them per endpoint.
  • Throughput: requests or transactions completed per second. When load rises but throughput stays flat, the system has stopped scaling.
  • Error rate: the share of requests that fail, time out, or return server errors. Fast errors can make latency charts look healthy, so always read the two together.
  • Saturation: how full your constrained resources are: CPU, memory, database connections, thread pools, and queue depth.

These line up with the four golden signals (latency, traffic, errors, and saturation) described in the Google SRE book's monitoring chapter. For server-side analysis, Brendan Gregg's USE method is a practical checklist: for every resource, check utilization, saturation, and errors.

Load testing example: a month-end invoicing peak

Here is a load testing example for a fictional invoicing app whose busiest hour falls on the last working day of the month. Every number below is an illustrative example for this scenario, not a benchmark.

The load test plan

Item

Plan

Goal

Confirm the app meets its SLOs at month-end peak plus 25% headroom

Expected peak

1,200 concurrent users (from last quarter's analytics)

Test target

1,500 concurrent users

Workload mix

Sign in and dashboard 35%, create and send invoice 30%, search invoices 25%, export monthly report 10%

Think time

Random 5 to 15 seconds between actions, about 10 seconds on average

Test data

5,000 test accounts with production-sized invoice histories

Load profile

Ramp to 1,500 users over 15 minutes, hold 45 minutes, ramp down over 10 minutes

Pass criteria

p95 under 1 second, p99 under 2.5 seconds, error rate under 0.5%, throughput steady during the hold

Monitoring

App server CPU and memory, database CPU, connection pool use, export request duration

This plan uses a closed model, which fits logged-in business users; for anonymous public traffic you would set an arrival rate instead.

A quick sanity check on throughput: each virtual user completes one cycle of about 10 seconds of think time plus a few hundred milliseconds of response time, so roughly one request every 10.3 seconds (to keep the math simple, assume each action is one request; in practice, count requests per journey and multiply). That means 1,500 users should produce about 1,500 / 10.3, or roughly 145 requests per second, if the system keeps up.

Reading the results

The first run fails. Here is what the team saw, averaged over a few minutes at each load level as it climbed:

Concurrent users

Throughput

p95

p99

Error rate

DB connections in use

600

58 req/s

420 ms

900 ms

0.1%

35 of 100

900

86 req/s

480 ms

1,050 ms

0.1%

58 of 100

1,200

110 req/s

950 ms

2,800 ms

0.3%

94 of 100

1,500

114 req/s

3,900 ms

9,500 ms

2.6%

100 of 100

Read it from top to bottom. Up to 900 users, throughput grows in line with load and latency barely moves. At 1,200 users, p95 is still inside target, but p99 has already broken its 2.5 second limit and the connection pool is nearly full. At 1,500 users, throughput flattens at 114 requests per second instead of the expected 145 or so, latency jumps, and errors appear. Flat throughput plus a full connection pool points to one cause: requests are queuing for database connections.

Database CPU was only moderately busy, so the database itself was not the limit. Tracing showed report exports holding connections open for long-running queries, starving the other journeys. The team moved exports to a background queue and pointed them at a read replica.

The second run, with the same plan, held throughput at about 145 requests per second, with p95 at 610 ms, p99 at 1,400 ms, an error rate of 0.1%, and around 52 of 100 connections in use. All pass criteria met.

Two lessons carry over. First, p99 warned of the problem before p95 did, which is why you set targets on both. Second, the test showed the first bottleneck, not the last. Knowing how far past 1,500 users the app can go is a question for a stress test.

Load testing in CI/CD

A full peak load test often runs for an hour or more and needs a production-like environment, so it does not belong on every commit. A practical split looks like this:

  • On every merge: a short smoke load test, a few minutes at low load against key endpoints, with thresholds that fail the build on a clear regression
  • Nightly or weekly: an average load test against a stable environment, with results stored so you can spot trends
  • Before each major release or seasonal peak: the full peak load test from your plan, plus a soak test if the release touches memory, caching, or connection handling

Tools such as k6 support thresholds that fail the run when a target is missed, which turns performance targets into quality gates. Our guide to the CI/CD pipeline covers where gates like this fit in the wider flow.

Load testing tools

Open-source tools cover most needs. Apache JMeter builds test plans in a GUI and runs them from the command line, and the JMeter best practices guide recommends CLI mode for real load tests. Grafana k6 uses JavaScript test scripts and runs from the command line, and its load testing guide covers profiles and thresholds. Gatling writes tests as code in Java, Kotlin, or Scala, and Locust defines user behavior in plain Python. Commercial options such as OpenText LoadRunner add broad protocol support, hosted load generation, and reporting. For a full comparison, see our roundup of performance testing tools.

If your team already runs functional tests in Katalon Studio, you can trigger load tests from the same suite. Our guide on running OctoPerf load tests with Katalon Studio shows a test suite starting an OctoPerf scenario through its API, tracking the run, and downloading the load test report.

Load testing mistakes that skew your results

  • No think time or pacing. Virtual users firing requests back to back generate far more traffic than real people. For example, 1,500 users with no think time and a 300 ms response time send about 5,000 requests per second, roughly 35 times the traffic in the example above.
  • Unrealistic test data. If every virtual user signs in as the same account and searches for the same term, caches answer everything and the database barely works. Use enough unique data to match production cache behavior.
  • Testing from one machine. A single load generator often runs out of CPU, sockets, or bandwidth before your system does.
  • Skipping the baseline. Without a baseline from a known build, you cannot tell a regression from normal behavior.
  • Reading only averages. An average of 300 ms can hide a p99 of several seconds. The slow tail is what users remember.

Start with one journey

You do not need a full workload model on day one. Pick your busiest user journey, pull its peak traffic from production, set a p95 and an error rate target, and run a ramp-hold-ramp test in a production-like environment. Once that runs reliably, add journeys, add it to your pipeline, and keep the results as a trend line.

Frequently asked questions

Huyen Nguyen
Huyen NguyenTechnical Writer, Katalon

Huyen Nguyen is an experienced technical writer in the software testing industry. With strong technical expertise and a deep understanding of Katalon products, she creates clear, practical guides that support testers at every skill level.

Connect on LinkedIn →
Get started

Test everything. Ship with confidence.

From generating test cases to spotting failures, Katalon's AI works across your entire pipeline, automatically.

Live webinar

The Next Evolution of Manual Testing: Introducing Katalon AI Test Runner

Learn how to grow your QA team's capacity in the age of AI, then watch Katalon AI Test Runner turn manual test cases into automated runs, live.

2:00 to 3:00 PM IST
Almas AhmedSenior Account Manager
Sumit WankhedeSolutions Engineer Manager
Register now