Monday 27 January 2020

Jmeter Thread Group

Video Tutorial -

With help of thread group jmeter script can simulate the number of users as per configured in thread group to access the server and perform specified actions. We can configure the users through Thread properties mentioned in diagram given below.

Number of Threads - Specify number of virtual users for which we want to execute the script.

Ramp-Up Period - The time to start all threads mentioned from 0 to specified number.

For example if we say 10 threads and 10 ram-up time means all 10 threads will be up and running by 10 seconds. The basic formula here us number of threads divided by ramp-up time.

Loop count- Number of iterations for each thread. The script will continue execution until for all threads all samplers are executed and there are no loops left. If loop count is set to forever then we can control the threads will continue execution until specified time in the Duration section.

Suppose we specify 10 mins as duration the the threads will continue execution until 10 mins.

Scheduler - This is used to set total duration of the test. Once we check Schedular Durationa field is available to edit. We can set any duration for our choice let us set to 60 secs.What if there is error we can select what actions we want to perform as shown in the below .

a. Continue - Continue the test even if there are failures.
b. Start Next Thread Loop - Stops the execution of current thread and starts next thread look execution.
c. Stop Thread - This will kill thread group
d. Stop Test - Stop test gracefully and allows current running operation to complete and then stop the test.
e. Stop Test Now - This will stop the test immediately respective of what operations are running.


Let us consider we have more than one thread group and add thread group 2. In this case both the thread groups starts in parallel by default.

Now suppose we have requirement where thread group 2 is dependent of thread group then in this case we can go to Test Plan and the select option "Run Thread Groups Consecutively".

In Case we have requirement where we need to execute Specific actions before and after a thread group then we can use Set Up and Tear Down Thread Group.


Post a Comment