Performance Testing — Load, Stress & Benchmarks
Performance bugs don't show up in functional tests. They show up when 10,000 users arrive at once. Here's how to test for load, stress, and durability before your users do.

- performance-testing
- load-testing
- k6
- JMeter
- scalability
Short answer
Performance testing checks how your product behaves under pressure, not just whether it works. It has three types: load tests for expected traffic, stress tests for breaking points, and soak tests for problems that appear over hours. Test full user journeys, track P95 and P99 response times rather than averages, and run before launches.
Key takeaways
- Load, stress, and soak testing are all required
- Track P95 and P99, not averages
- k6 is the best starting point for most teams
- Test full user journeys, not single endpoints
- Run before launches, after infra changes, and continuously
Functional testing asks: does it work? Performance testing asks: does it work under pressure? Both matter. Only one is usually skipped.
Performance bugs are the silent killers of good products. The app works beautifully in dev with 10 users. Then marketing drives 10,000 users, and the site crashes.
What are the three types of performance testing?
- Load testing — Simulates expected peak traffic. Confirms the system handles it without degradation.
- Stress testing — Pushes beyond expected peak to find the breaking point.
- Soak testing — Runs moderate traffic for hours/days to find leaks and slow failures.
Which performance metrics matter?
- Throughput — Requests per second
- Response time (P50, P95, P99) — Not averages
- Error rate — % of requests that fail under load
- Concurrency — Simultaneous users handled
- Resource usage — CPU, memory, DB connections at load
- Recovery time — Return to baseline after traffic drops
- Skip "average response time" — it hides the P99 experience.
Tooling
- k6 — Modern, developer-friendly. Our recommendation for most teams.
- JMeter — Mature, feature-rich. Steeper learning curve.
- Lighthouse — Frontend performance (different category).
- Locust — Python-based.
- Gatling — Scala-based.
How to run performance tests
- Define your target: expected peak traffic + response time SLO
- Build realistic scenarios (full user journeys, not single endpoints)
- Baseline at low traffic
- Load test at expected peak
- Stress test beyond peak
- Soak test for durability
- Monitor everything
What we typically find
- Database queries that scale linearly
- Missing indexes causing slow queries
- Connection pool exhaustion
- Memory leaks that surface after hours
- Third-party APIs that throttle unexpectedly
- N+1 query patterns in ORMs
None of these show up in functional testing.
When should you run performance tests?
Before major launches — Non-negotiable
- After infrastructure changes
- After scaling milestones
- Continuously in production (synthetic monitoring)
Setting realistic targets
Start from the business, not the tool. Work out your expected peak from analytics or from the campaign, launch or sale that will cause it, and turn it into concurrent users and requests per second. Then agree targets for each key journey, for example a P95 response time and a maximum error rate, before you run a single test.
Building realistic scenarios
- Mix journeys in the same proportions real users follow them, using your analytics
- Add think time between steps, because real people pause to read and type
- Use realistic data volumes: a search over ten records behaves differently from a search over ten million
- Ramp traffic up gradually instead of starting at full load
- Generate load from the regions where your users are
For a worked example, our e-commerce load testing guide runs one k6 peak-sale test against three checkout designs and shows why a load test must check overselling and orders, not only response times.
Frontend performance and Core Web Vitals
Load tests measure the server. Users also feel how fast the page renders in their browser. Google's Core Web Vitals set "good" thresholds for that: Largest Contentful Paint under 2.5 seconds, Interaction to Next Paint under 200 milliseconds and Cumulative Layout Shift under 0.1. Check them with lab tools such as Lighthouse, and with field data from real users in Search Console or the Chrome UX Report.
Reading the results
Look for the point where response times start to climb steeply as load rises. That knee shows your real capacity. Line it up with server metrics, such as CPU, memory, database connections and queue length, to find which resource runs out first. Fix that, then test again: the next bottleneck is usually somewhere else.
Performance testing in CI
A full load test is too slow for every commit, but a short test of key endpoints can run on every release. Compare the results with a stored baseline and flag the build when P95 response time or error rate gets worse by more than an agreed margin. Slow regressions are caught when they are small and cheap to fix.
Database bottlenecks to look for
- Queries without an index on the columns they filter or sort by
- The N+1 pattern: one query per item in a list instead of one query for the list
- Long transactions holding locks that block other requests
- A connection pool too small for the traffic, so requests queue
- Reports or exports running on the same database as live traffic
Caching and CDNs
Caching is often the cheapest performance win. Serve static files and, where possible, whole pages from a CDN, cache expensive queries and API responses with sensible expiry times, and test what happens when the cache is empty, for example right after a deploy or a cache flush. A system that is only fast with a warm cache needs that cold-start case in its load tests.
Frequently asked questions
- Should we load test production? — Usually not at full scale. Test a production-like environment, and in production use light synthetic monitoring. If you must test production, do it at quiet hours with everyone on the team informed.
- How long should a soak test run? — Long enough for slow problems such as memory leaks to show, often several hours or overnight. Match it to how long your system runs between restarts.
- Is k6 or JMeter better? — Both are capable. k6 scripts are JavaScript and fit developer workflows and CI well; JMeter has a graphical interface and a large plugin ecosystem. Pick the one your team will keep using.
Common mistakes
- Testing single endpoints instead of full journeys
- Skipping soak testing
- Not testing from realistic locations
- Ignoring third-party API limits
- Testing in dev instead of production-like environments
Free QA spot-check
Want a QA engineer to look at your product?
Send us your website or web app address. An engineer will test one key journey, such as sign-up, search or checkout, on desktop and mobile, and email you the most important issues we find. Free, and no call needed.
Related service
QA Testing →Automated suites, manual deep-dives, and CI guardrails that catch regressions before your users do.
Further reading
About the author
Kawsher, Founder, QA Labs →Kawsher is the founder of Quality Assurance Labs (QA Labs), the QA-first software testing and development company in Bogura, Bangladesh, founded in 2021. Every article and case study on this site is written or reviewed by Kawsher, drawing on the team's QA testing, AI, web, mobile, video and marketing work for SaaS and AI teams worldwide.


