Elements of a Test Plan in Jmeter
A typical test plan will consist of one or more Thread Groups, logic controllers, listeners, timers, assertions, and configuration elements:
a. Thread Group—each thread simulates a single user. All elements of a test plan must be under a thread group. The thread group element controls the number of threads JMeter will use to execute your test. The controls for a thread group allow you to:
1. Number of threads (users) - multiple threads are used to simulate concurrent connections to server application.
2. Ramp-up period (in seconds) – tells JMeter how long to take to "ramp-up" to the full number of threads chosen.
E.g. If 50 threads are used, and the ramp-up period is 200 seconds, then JMeter will take 200 seconds to get all 50 threads up and running. Each thread will start 4 (200/50) seconds after the previous thread was begun.
3. Loop count or number of times to execute the test - If the number is set, and then JMeter will execute the test for given number of times before stopping. By default, a thread group is configured to loop indefinitely through its elements.
Thread properties are shown as below:
b. Listeners—Provide access to the information gathered by JMeter about the test cases while JMeter runs. The listener plots the response times on a graph. Listeners can only be added to a Thread Group, and they only collect information specific to that Thread Group.
c. Controllers— Generative Controllers tell JMeter to send requests to a server, while Logical Controllers let you customize its logic.
JMeter has two types of Controllers: Generative and Logical.
· Generative Controllers tell JMeter to send requests to a server. For example, add an HTTP Request Generative Controller if you want JMeter to send an HTTP request.
· Logical Controllers let you customize the logic that JMeter uses to decide when to send requests. For example, you can add an Interleave Logic Controller to alternate between two HTTP Request Generative Controllers.
d. Timers—Allow JMeter to delay between each request that a thread makes. By default, a JMeter thread sends requests without pausing between each request.
If more than one timer is added to a Thread Group, JMeter takes the sum of the timers and pauses for that amount of time.
e. Assertions—Allow you to "test" that your application is returning the results you expect it to. For instance, you can assert that the response to a query will contain some particular text. To view the assertion results, add an Assertion Listener to the Thread Group.
f. Configuration Elements—Working closely with a Generative Controllers, these can add to or modify requests. A configuration element is accessible from only inside the tree branch where you place the element.
Screenshot showing the icons representing the elements:
Nice post dear,Thanks for sharing your views about What is the thread group in Jmeter
ReplyDelete