Basic Load Test Using Apache JMeter
Preconditions (2)
✅ Expected Result: The test completes without errors, and the response times are recorded in the listener showing successful requests
Test Plan:
Thread Group:
Number of Threads (users): 10
Loop Count: 5
HTTP Request:
Server Name or IP: example.com
Path: /api/test
Response Assertion:
Field to Test: Response Code
Pattern Matching Rules: Equals
Patterns to Test: 200
Summary Report Listener
# Explanation:
# This JMeter test plan simulates 10 users sending 5 requests each to the target URL.
# The Response Assertion checks that each HTTP response returns status code 200.
# The Summary Report Listener collects metrics including average response time.
# This setup helps verify the server handles load and responds correctly within expected time.This test plan uses Apache JMeter to simulate multiple users accessing a web service.
The Thread Group controls how many users and how many times they send requests.
The HTTP Request sampler defines the target URL to test.
The Response Assertion ensures the server responds with status code 200, meaning success.
The Summary Report Listener collects performance data like response times.
This setup helps check if the server can handle the load and respond quickly.
Now add data-driven testing with 3 different URLs to test performance on multiple endpoints
from locust import HttpUser, task, between
class WebsiteUser(HttpUser):
wait_time = between(1, 3)
@task
def load_main(self):
self.client.get("/")"Could not find simulation class". What is the most likely cause?Pass the test and this pattern moves unknown