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:
Open JMeter and Add a Thread Group: Number of Threads (users): 1000 , Ramp-Up Period: 20 seconds, Loop Count: 1
Add an HTTP Request: Method: GET, URL: https://dev.to/pod
Add Listener: View Results Tree
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)