Thread Groups in JMeter

Thread Group


Thread group element controls the number of threads that will be used to execute in your test. In this you can control the number of threads, the ramp up time, execution time and start and stop time of the test.

Available only after enable of scheduler, used to choose the startup delay

Attribute
Description
Action to be taken after a Sampler error
Continue - ignore the error and continue with the test
Start Next Loop - ignore the error, start next loop and continue with the test
Stop Thread - current thread exits
Stop Test - the entire test is stopped at the end of any current samples.
Stop Test Now - the entire test is stopped abruptly. Any current samplers are interrupted if possible.
Number of Threads
Number of users to simulate
Ramp-up Period
To initialize the users on to server
Loop Count
Denotes the number of times the user to perform a particular test
Delay Thread creation until needed
Waits until the completion of the time mentioned to create threads
Scheduler
To enable or disable the scheduler
Start Time
Available only after enable of scheduler, used to mention at what point of time the execution need to be started
End Time
Available only after enable of scheduler, used to mention at what point of time the execution need to be stopped
Duration
Available only after enable of scheduler, used to mention how long the execution is to be happened.
Note: If duration time is mentioned, then the end time will be ignored
Startup delay
Available only after enable of scheduler, used to choose the startup delay



Fig: Thread Group with Scheduler enabled


Fig: Thread Group with Loop Count


 jp@gc – Stepping Thread Group


This thread group will start [ 100 ] threads (Users) –> Total number of users are 100.

First Wait for [ 0 ] Seconds. –> There will not be any delay to start the thread once you will run Jmeter.

Then start [10] threads every 30 Seconds —> every 30 seconds 10 threads will start till 100 Threads.

Using Ramp up [5] seconds –> each users taking .5 seconds to hit the server.

Then hold load for [60] seconds –> Once all the threads started it will hold the thread running for 60 seconds.

Finally, Stop [5] threads every [1] sec. –> in each second 5 thread will stop.



Fig: Stepping Thread Group

1 comment:

  1. Hi,

    I have run a test using stepping thread group of 10 users and add 1 thread for very 10 second's. holding time is 600 seconds. and finally stop 1 thread every 20 seconds.
    But for my case samples are around '57781'. I am seeing this sample count is Aggregate report, Summary Report and View results in Table
    *I have run the same scenario twice, i got ''57781'' samples first time and '34983' sample second time*.
    Please let me the the difference why the sample count is different and What is the sample count

    ReplyDelete