JMeter Tutorial – Test Plan Elements
ThreadGroup
Thread Group elements are the beginning points of your test plan. As the name suggests, the thread group elements control the number of threads JMeter will use during the test. We can also control the following via the Thread Group:
- By setting the number of Threads.
- By setting the Ramp-Up Time
- By setting the number of test iterations.
The Thread Group Control Panel looks like this:
Details of each component on the above panel are:
- Action to be taken after a Sampler error: In case any error occurs during test execution you may let the test either:
- Continue to the next element in the test
- Stop Thread to stop the current Thread.
- Stop Test completely, in case you want to inspect the error before continue running.
- Number of Threads: Simulates the number of the user(s) or connection(s) to your server application.
- Ramp-Up Period: Defines how long it will take JMeter to get all threads running.
- Loop Count: Defines the number of times to execute the test.
- Scheduler checkbox Once selected, the Scheduler Configuration section will appear at the bottom of the control panel.
- Scheduler Configuration You can configure the start and end times of running the test.
Controllers
JMeter has two types of Controllers: Samplers and Logic Controllers.
Samplers
Samplers allow JMeter to send specific types of requests to a server. They simulate a user’s request for a page from the target server. For example, you can add an HTTP Request sampler if you need to perform a POST, GET, DELETE on an HTTP service
Some useful samplers are:
- HTTP Request
- FTP Request
- JDBC Request
- Java Request
- SOAP/XML Request
- RPC Requests
An HTTP Request Sampler Control Panel looks like the following figure: