JMeter cheatsheet
A one-page reference for JMeter. For distributed testing and metrics deep-dives, see the complete guide.
๐ Full guide: JMeter โTest plan structureโ
Test Plan
โโ Thread Group
โโ HTTP Request Sampler
โโ Assertions (Response, Duration)
โโ Listeners (View Results Tree, Summary Report)
โโ Config Elements (CSV Data Set, HTTP Header Manager)
Thread group configโ
| Field | Meaning |
|---|---|
| Threads | concurrent virtual users |
| Ramp-up | seconds to start all threads |
| Loop count | iterations per thread |
Types of load testingโ
| Type | Goal |
|---|---|
| Load | expected traffic, verify SLAs |
| Stress | push past capacity, find breaking point |
| Spike | sudden traffic burst |
| Soak | sustained load over hours โ finds leaks |
Correlation & parameterizationโ
CSV Data Set Config โ ${username}, ${password}
Regular Expression Extractor โ capture sessionId from response
${sessionId} โ reused in next request
Correlation replays dynamic values (tokens, IDs) that change per session.
Distributed (remote) testingโ
# on each worker
jmeter-server
# on the controller
jmeter -n -t plan.jmx -R worker1,worker2 -l results.jtl
Key metricsโ
- Throughput โ requests/sec the system sustains.
- Latency vs response time โ latency excludes time to read the full response.
- Error % โ failed requests under load.
- 90th/95th/99th percentile โ tail latency, more meaningful than average.
Non-GUI mode for CIโ
jmeter -n -t plan.jmx -l results.jtl -e -o report/
Always run load tests non-GUI โ the GUI itself consumes resources and skews results.
Common pitfallsโ
- Running from a resource-starved laptop instead of a dedicated load generator.
- Ignoring think-time โ unrealistic hammering vs real user pacing.
- Not correlating dynamic tokens โ replays fail silently after session 1.