Time to apply everything you have learned. These exercises build on each other, taking you from individual components to a complete test plan. Do each one in JMeter -- reading about components is not enough, you need to build them to truly understand how they work together.
Create a Thread Group with 5 users, 5 second ramp-up, 10 loops.
Add an HTTP Request: GET https://jsonplaceholder.typicode.com/posts/1
Add a Constant Timer (2000ms). Run the test and note the throughput from Summary Report.
Replace with Uniform Random Timer (1000ms offset, 3000ms random). Run again -- compare throughput.
Replace with Gaussian Random Timer (2000ms offset, 800ms deviation). Run again -- compare.
Finally, replace with Constant Throughput Timer set to 30 samples/min, "all active threads". Run and verify actual throughput matches 30/min.
Document: which timer gave the most consistent request spacing? Which felt most realistic?
Create a Thread Group with 3 users, 3 second ramp-up, 1 loop.
HTTP Request #1: GET https://jsonplaceholder.typicode.com/users -- name it "Get Users".
Add a JSON Extractor under "Get Users": extract the first user ID using $..[0].id into variable userId.
HTTP Request #2: GET https://jsonplaceholder.typicode.com/posts?userId=${userId} -- name it "Get User Posts".
Add a JSON Extractor under "Get User Posts": extract the first post ID using $..[0].id into variable postId.
HTTP Request #3: GET https://jsonplaceholder.typicode.com/comments?postId=${postId} -- name it "Get Post Comments".
Add Response Assertions on all three requests verifying response code = 200.
Add View Results Tree and verify the extracted values flow correctly between requests.
Verify in View Results Tree that request #2 uses the userId from request #1, and request #3 uses the postId from request #2.
Create a Thread Group with 10 users, 10 second ramp-up, 3 loops.
Add an HTTP Request Defaults with server: jsonplaceholder.typicode.com, protocol: https.
Add a JSR223 PreProcessor at Thread Group level: vars.put("scenario", new Random().nextInt(100).toString())
Add Transaction Controller "Browse Posts" with If Controller: ${__groovy(vars.get("scenario").toInteger() < 60)} (60% of users).
Inside, add: GET /posts, JSON Extractor for postId, GET /posts/${postId}/comments.
Add Transaction Controller "Browse Users" with If Controller: ${__groovy(vars.get("scenario").toInteger() >= 60)} (40% of users).
Inside, add: GET /users, JSON Extractor for userId, GET /users/${userId}/todos.
Add Gaussian Random Timer (2000ms ± 500ms) at Thread Group level.
Add Duration Assertions (3000ms) to all requests.
Add Summary Report and Aggregate Report listeners.
Run the test. In the Aggregate Report, verify that "Browse Posts" transactions appear roughly 60% of the time and "Browse Users" roughly 40%.
Combine everything into a single comprehensive test plan. This is the exercise that will prepare you for real project work and interview demonstrations.
Create User Defined Variables: BASE_URL=jsonplaceholder.typicode.com, PROTOCOL=https, SLA_MS=2000.
Add Thread Group: ${__P(threads,20)} users, ${__P(rampup,20)} second ramp-up, duration ${__P(duration,120)} seconds.
Add HTTP Request Defaults using ${PROTOCOL} and ${BASE_URL}.
Add HTTP Header Manager: Accept=application/json, Content-Type=application/json.
Transaction: "List Resources" -- GET /posts, GET /comments, GET /users (Loop Controller: 2 iterations).
Transaction: "Create Resource" -- POST /posts with body {"title":"Test ${__threadNum}","body":"Content","userId":1}.
Add JSON Extractor on POST to capture the new post ID.
Transaction: "Verify Resource" -- GET /posts/${newPostId}, Response Assertion: body contains "Test".
Add Gaussian Random Timers between transactions.
Add Duration Assertions (${SLA_MS}) on all requests.
Run in GUI with 2 users to validate. Then run in CLI: jmeter -n -t plan.jmx -l results.jtl -e -o report/ -Jthreads=20 -Jduration=120.
Open the HTML report and analyze: check p95 for each transaction, error rate, and throughput trend.
jsonplaceholder.typicode.com is a free public API. Keep your tests under 20 users and 2-minute durations to be respectful. For serious load testing, set up your own local server or use the practice portals on this platform.
Key Point: Practice is the only way to internalize JMeter components. Build each exercise from scratch, do not copy-paste. Understanding comes from clicking through the GUI, making mistakes, and debugging.
Key Point: Practice each exercise hands-on: timer comparison, correlation chains, conditional scenarios, and a full production-style test plan.