Thread Group

These elements are used to specify number of running threads, a ramp-up period, and loop-count (no. of times to execute the test). Each thread simulates a user and the ramp-up period specifies the time to create all the threads. For example with 5 threads and 10 seconds of ramp-up time, it will take 2 seconds between each thread creation. The loop count defines the number of times the test will repeat for the thread group. The scheduler also allows you to set the start and end of the run time.


A Thread Group represents a group of users that will execute a particular test case. In its Control Panel, shown in the following figure, you will be able to simulate the "number of users", how long it takes to start each "user" (or how often the users should send requests), the number of times to perform the test (or how many requests they should send), and a start and stop time for each test.

Elements must be placed under a Thread Group as they define a Test Plan. A Thread Group controls the number of threads (or "users") Jmeter will use to execute your test. If there are two or more Thread Groups in the same Test Plan, each Thread Group will execute completely independently from each other. Multiple Thread Groups within the same Test Plan simply simulate groups of concurrent, individual connections to your server application. The Control Panel allows us to configure each Thread Group to have its own set of specific "behaviours".


Action to be taken after a Sampler error
In case of any error recorded in any Sample as the test runs, you may let the test either: Continue to the next element in the test, or Stop Thread to stop the current Thread, or Stop Test completely, in case you want to inspect the error before continue running.

Number of Threads
Simulates the number of user(s) or connection(s) to your server application.

Ramp-Up Period
Defines how long it will take Jmeter to get all threads running. For example, if there are 10 threads and a ramp-up period of 60 seconds, then each successive thread will be delayed by 6 seconds. In 60 seconds, all threads would be up and running. The best policy is to make your ramp-up period long enough to avoid large workload as the test begins, but short enough to allow the last one to start running before finishing the first one. You may set your ramp-up period to be equal with the number of threads, and later adjust accordingly.

Loop Count
Defines the number of times to execute the test. By default, the test is executed once but you can adjust as needed. Clicking the Forever checkbox causes the test to run repeatedly until stopped manually.

Scheduler Checkbox
Once selected, the Scheduler Configuration section will appear at the bottom of the control panel.

Scheduler Configuration
Version 1.9 and later reveals this feature, where you can set the start and end time of running the test. Once you start the test, it will not execute any elements until the start time is reached. After each execution cycle, unless the end-time is reached, in which case the run is stopped, the iteration will continue until the loop count limit. The startup delay field allows Jmeter some time before a thread is started and the duration field lets you define the duration of the whole test. The former overrides start-time, while the latter overrides end-time.