Saturday 8 August 2015

JMeter Add Thread group to test plan

Thread groups are the beginning points of any test plan. All controllers and samplers are under thread group. Thread group controls the number of threads JMeter will use to execute your test. If there are more than one thread group configured for a test plan, each thread group executes independently from each other.

How to add a thread group
Right click on Test Plan -> Add -> Thread (Users) -> Thread Group

Once you add thread group, it opens Thread group panel like following.
1. Update name of the Thread Group
You can change the name of thread group, by updating the text field labeled with Name.

2. Update comments for Thread Group
You can add comments to the thread group, by updating the text field labeled with Comments.

3. Action to be taken after a sampler error
At present, this section support five actions
         3.a Continue: Continue next test
         3.b Start Next thread loop
         3.c Stop Thread: Stop current thread
         3.d Stop Test: It stop test completely
         3.e Stop Test Now

4. Thread Properties
4.a Number Of Threads(Users): Specifies number of threads JMeter use to run our test plan.

4.b Ramp-up period (in seconds)
Specifies how long JMeter takes to get all threads running. If number of threads are 10, and ramp-up period is 100 seconds, then JMeter takes 100 seconds to get all 10 threads create and running, like thread1 starts functioning at 10th second, thread2 start functioning at 20th second, Thread3 starts functioning at 30th, Thread4 start functioning at 40th and so on (ramp-up time/Number Of threads = 100/10 = 10 seconds).

Be careful before setting this value, since each thread execute whole test plan, if the value is too high the first may finish executing the whole test plan before the second thread will even begin.

4.c Loop Count
Defines number of times to execute the test. By default test executes once. If you select “Forever” option, then test runs indefinitely, until you stop it manually.

5. Delay Thread creation until needed
If you select this option, then it will create and start threads when needed instead of creating them on Test startup  
6. Scheduler
Once you select Scheduler, it opens scheduler specific properties. By using these properties you can set the duration, Start time and End Time for the time scan.




Prevoius                                                 Next                                                 Home

No comments:

Post a Comment