DEV Community

Cover image for How to Practice JMeter with a Real-Life Scenario - J4.2
Maric Run Test
Maric Run Test

Posted on • Edited on

How to Practice JMeter with a Real-Life Scenario - J4.2

Testing GET APIs with View Results Tree

πŸ“Œ Pre-condition

  • Tool: Apache JMeter
  • Objective: Test the GET API https://dev.to/pod with 1000 users
  • Environment: Local test, no token required
  • Listener: View Results Tree

πŸ§ͺ Steps:

  1. Open JMeter and Add a Thread Group: Number of Threads (users): 1000 , Ramp-Up Period: 20 seconds, Loop Count: 1

  2. Add an HTTP Request: Method: GET, URL: https://dev.to/pod

  3. Add Listener: View Results Tree

  4. Run the test and observe each request in the result tree

πŸ“Š Expected:

  • All requests return status code 200 OK
  • Response content correctly displays the Podcast page
  • No HTTP errors or timeouts
  • Response time is reasonable (under 2000ms)

πŸ” Analyzing the Results from View Results Tree

The View Results Tree listener shows each individual request, allowing you to analyze:

  • Request details: URL, method, headers, and sent parameters
  • Response body: Helps verify if the returned data is correct
  • Status code: Confirm if the response is 200 OK or has errors
  • Time taken: Check which requests are slowest

πŸ’‘ Example: A test might pass with 200 OK, but the body could show an error message, empty data, or the wrong structure β€” View Results Tree reveals that.

🧠 Lessons Learned

  • View Results Tree is best for validating individual responses
  • Not suitable for performance metrics (use Summary Report / Aggregate Report instead)
  • Helps identify API logic issues and validate content accuracy
  • Ideal for QA doing functional testing alongside load testing

πŸ›  Practice Tips

  • Compare View Results Tree and Summary Report to understand each listener’s purpose
  • Use Regular Expression Extractor to validate key values in responses
  • Combine with CSV Data Set Config to test dynamic input data at scale

Top comments (0)