Home / Insights / QA and Software Testing
QA and Software Testing
Load Testing in Practice: Planning, Running and Learning from Performance Tests
Load testing shows how a system behaves under expected and extreme traffic before real users find out. This guide covers test types, workload modelling, targets, environments, tools, metrics and how to turn results into fixes and continuous checks.
TopicsQA and Software TestingArchitecture and ModernizationWeb and SaaS Development
Key takeaways
- Different questions need different tests: load, stress, spike, soak and capacity tests.
- Model realistic workloads from production analytics — user journeys, mix, think time and data volumes — not single-endpoint hammering.
- Set targets as service-level objectives: response-time percentiles, error rates and throughput.
- Test in production-like environments with realistic data, and monitor the whole system during tests.
- Make performance testing continuous with smaller automated checks in the pipeline and full tests before major releases.
On this page
Performance problems are among the most visible failures a product can have: a checkout that times out on launch day, an API that slows to a crawl at month-end, a system that degrades after running for a week. Load testing finds these problems before customers do.
Types of performance tests
| Test | Question it answers |
|---|---|
| — | — |
| Load test | Does the system meet targets at expected peak load? |
| Stress test | Where does it break, and how does it fail? |
| Spike test | Can it handle sudden surges, such as a marketing email or flash sale? |
| Soak (endurance) test | Does it degrade over hours or days — memory leaks, connection exhaustion? |
| Capacity test | How much load can it handle with current resources, and how does it scale? |
| Scalability test | Does adding resources increase capacity as expected? |
Plan the test type around the risk you are worried about.
Planning a load test
- Define objectives: which journeys, which peak, which targets.
- Model the workload: use analytics for journey mix, arrival rates, think times and session lengths.
- Set targets: for example, 95th percentile response time under a set threshold for key pages, error rate below an agreed limit, at a defined requests-per-second rate.
- Prepare data: realistic volumes and variety; enough unique users and items to avoid unrealistic caching.
- Choose the environment: as close to production as possible in size and configuration.
- Instrument everything: application, database, cache, queues, infrastructure and third-party calls.
- Plan third parties: use sandboxes or stubs, and agree with providers before testing against them.
Metrics to watch
| Layer | Metrics |
|---|---|
| — | — |
| User experience | Response time percentiles (p50, p95, p99), error rate, throughput |
| Application | CPU, memory, garbage collection, thread and connection pools |
| Database | Query latency, locks, connection counts, slow queries |
| Infrastructure | Auto-scaling events, network, disk I/O |
| Dependencies | Latency and errors from external services |
Averages hide problems; focus on high percentiles.
Running and analysing
- Ramp up gradually to see where performance starts to degrade.
- Hold at peak long enough to reach steady state.
- Correlate response-time increases with resource saturation to locate bottlenecks.
- Change one thing at a time when tuning, and rerun.
- Document results with configuration, data and versions so tests can be compared later.
Common bottlenecks
- Missing or inefficient database indexes and N+1 queries.
- Undersized connection pools or thread pools.
- Synchronous calls to slow external services.
- Caches that are cold, too small or invalidated too often.
- Auto-scaling that reacts too slowly to spikes.
- Locks and contention on shared resources.
Tools
Popular open-source tools include k6, JMeter, Gatling and Locust; cloud load-testing services can generate large distributed loads. Choose tools your team can script and maintain, and that integrate with your CI and monitoring.
Making it continuous
- Pipeline checks: short performance tests on key endpoints for each release, with thresholds that fail the build on regressions.
- Scheduled full tests: before major releases, seasonal peaks and infrastructure changes.
- Production monitoring: real-user metrics and alerts to validate assumptions.
Our guide to designing a CI/CD pipeline explains where performance gates fit.
Worked example: preparing for a seasonal peak
A hypothetical online retailer expects traffic four times its normal peak during a holiday sale.
- Workload model: analytics show 60% browsing, 25% search, 10% basket and 5% checkout, with checkout as the critical journey.
- Targets: 95th percentile page response under two seconds and checkout error rate below 0.5% at four times normal peak.
- First run: response times rise sharply at three times peak; the database CPU saturates due to an unindexed search filter and inventory checks on every page view.
- Fixes: an index, caching of inventory counts for browse pages and a larger connection pool.
- Second run: targets met at four times peak; a stress test shows degradation begins at six times peak.
- Spike and soak tests: auto-scaling responds within acceptable time; no memory growth over eight hours.
The team also prepares a runbook for the sale day with dashboards, alert thresholds and actions such as disabling non-essential features under extreme load.
Frequently asked questions
Can we load test in production?
Sometimes, carefully and with safeguards, for example during low-traffic periods with gradual ramp-up and kill switches. Most testing should happen in production-like environments.
How much load should we test?
At least the expected peak plus a safety margin, and a stress test to find the breaking point.
How often should we load test?
Automated small checks on every release; full tests before major launches, peaks or architecture changes.
Who should own performance?
Product teams own performance of their services, with QA and platform teams providing tools and expertise.
Sources and methodology
Facts in this article were checked against the sources below on 6 November 2026. Directory data (ratings, review counts, rate bands and team sizes) changes over time and is shown as published on the date accessed. Illustrative examples are labelled as such and are not quotes.
- Google SRE book: Service Level Objectives — accessed 6 November 2026. Defining targets with service level indicators and objectives
Related reading
Continue your research
Worried about your next traffic peak?
Share your architecture and traffic expectations. We will design realistic load tests, run them and help you fix the bottlenecks.
