Let us build a real test plan step by step. We will create 10 virtual users that hit a public API, with think time between requests, and view the results. By the end of this lesson, you will have run your first performance test.
Right-click "Test Plan" in the tree → Add → Threads (Users) → Thread Group.
Name it: "API Load Test".
Number of Threads (users): 10 -- this creates 10 virtual users.
Ramp-Up Period (seconds): 10 -- users start 1 per second over 10 seconds.
Loop Count: 5 -- each user repeats the scenario 5 times.
This means: 10 users × 5 iterations = 50 total executions, starting gradually over 10 seconds.
| Setting | Value | Meaning |
|---|---|---|
| Number of Threads | 10 | 10 virtual users will be created |
| Ramp-Up Period | 10 seconds | Start 1 user per second (10/10=1) |
| Loop Count | 5 | Each user runs the test 5 times |
| Same user on each iteration | Checked | Same cookies/session across loops |
| Duration | (empty) | Use loop count instead of time-based |
The ramp-up period is important. If you set 100 threads with 0 ramp-up, all 100 users hit the server at the exact same millisecond. That is a spike test, not a load test. A ramp-up of 100 seconds means 1 user joins per second, giving the server time to warm up.
Right-click "API Load Test" (Thread Group) → Add → Sampler → HTTP Request.
Name it: "Get Products".
Protocol: https
Server Name or IP: jsonplaceholder.typicode.com (a free test API)
Method: GET
Path: /posts
Leave everything else as default.
Right-click "API Load Test" (Thread Group) → Add → Timer → Constant Timer.
Thread Delay (in milliseconds): 3000 -- 3 seconds between requests.
This simulates a user pausing for 3 seconds between actions.
Right-click "API Load Test" → Add → Listener → View Results Tree. (Shows individual request/response details)
Right-click "API Load Test" → Add → Listener → Summary Report. (Shows aggregated stats: avg, min, max, p95, throughput, error %)
Right-click "API Load Test" → Add → Listener → Response Time Graph. (Visual chart of response times over time)
Test Plan
└── API Load Test (Thread Group)
├── Get Products (HTTP Request)
├── Constant Timer (3000ms)
├── View Results Tree
├── Summary Report
└── Response Time GraphSave the test plan: File → Save As → first-test.jmx
Click the green Play button (▶) in the toolbar.
Watch the numbers in the top-right corner: threads running, elapsed time.
Click "View Results Tree" to see individual requests. Green = success. Red = failure.
Click "Summary Report" to see aggregated metrics: average time, p95, throughput, error %.
When done, click the red Stop button (⬛).
Clear results before each new run: click the broom icon (🧹) in the toolbar.
The View Results Tree listener stores every request and response in memory. For large tests (1000+ requests), it will consume all available memory and crash JMeter. Use it only for debugging with small user counts. Disable it during actual load tests.
Key Point: A basic test plan needs: Thread Group (users) → HTTP Request (what to test) → Timer (think time) → Listeners (results). Save as .jmx, click Play, watch Summary Report.
Key Point: First test plan: Thread Group + HTTP Request + Timer + Listeners. Save as .jmx, click Play, read Summary Report.