Skip to main content

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โ€‹

FieldMeaning
Threadsconcurrent virtual users
Ramp-upseconds to start all threads
Loop countiterations per thread

Types of load testingโ€‹

TypeGoal
Loadexpected traffic, verify SLAs
Stresspush past capacity, find breaking point
Spikesudden traffic burst
Soaksustained 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.
See: Common Pitfalls