Before we dive into tools in the next chapters, let us practice the most important skill in performance testing: identifying what to test. A performance test with the wrong scenario is worse than no test at all -- it gives false confidence.
Open the Shopping Portal. Browse through the flows: login, product search, product details, add to cart, checkout. Now design a performance test plan.
List the 5 most critical user flows in order of business impact.
For each flow, estimate: how many concurrent users would realistically perform this action?
Define pass/fail criteria: what response time is acceptable? What error rate is tolerable?
Design a load test: how many users, what ramp-up time, how long to sustain?
Design a stress test: at what user count do you expect the system to struggle? Where would you set the ceiling?
Design a spike test: what event could cause a sudden traffic burst? How many users, how quickly?
Identify one scenario that needs a soak test: what could leak or degrade over 24 hours?
| Scenario | Type | Users | Duration | Pass Criteria |
|---|---|---|---|---|
| Product browsing | Load | 500 concurrent | 30 min | p95 < 2s, errors < 1% |
| Search + add to cart | Load | 200 concurrent | 30 min | p95 < 3s, errors < 0.5% |
| Checkout flow | Load | 50 concurrent | 30 min | p95 < 4s, errors < 0.1% |
| Flash sale traffic | Spike | 100 → 3000 in 30s | 15 min | Recovery < 2 min, no data loss |
| Breaking point | Stress | 100 → 5000 gradual | 45 min | Document failure at each level |
| 24-hour stability | Soak | 200 constant | 24 hours | No memory growth > 20%, no crashes |
When defining pass criteria, use percentiles (p95, p99) not averages. An average response time of 1 second sounds great until you realize 5% of users wait 15 seconds. The p95 tells you what 95% of users actually experience.
Common mistake: testing with unrealistic scenarios. If 90% of your users browse products and 10% check out, your test should reflect that ratio. A test where 100% of virtual users do checkout is not realistic and will stress the checkout service while under-testing product browsing.
Key Point: A good performance test plan starts with realistic user flows, realistic user ratios, and clear pass/fail criteria using percentiles