Introduction
- Thread group elements are the beginning points of any test plan.
- All controllers and samplers must be under a thread group.
- Other elements, e.g. Listeners, may be placed directly under the test plan.
- Thread group element controls the number of threads JMeter will use to execute your test.
- controls for a thread group allow you to set:
number of threads
ramp-up period
number of times to execute the test.
Ramp Up Period
- Each thread will execute the test plan in its entirety and completely independently of other test threads.
- Ramp Up Periode : If 10 threads are used, and the ramp-up period is 100 seconds, then JMeter will take 100 seconds to get all 10 threads up and running. Each thread will start 10 (100/10) seconds after the previous thread was begun.
- Loop Count − Defines the number of times to execute the test.
Action to be taken after sampler error
- Continue : Continue the test even after a sampler error.
- Start Next Thread group :Start execute next thread gruop after is any sampler error occurs.
- Stop Thread : Stop executing test immediate if error occurs.
Scheduler Configuration
You can configure the start and end time of running the test.
Other Thread Group Elements
- Stepping Thread Group.
- Ultimate Thread Group.
- setUp Thread Group.
- tearDown Thread Group.
- Arrivals Thread Group.
- Free-Form Arrivals Thread Group.
- Concurrency Thread Group.
Stepping Thread Group
- Lets us create ramp-up and ramp-down scenarios in steps.
- Increase and Decrease load by portions.
- Initial threads can be delayed.
- Configure hold target load time.
- Real time Preview Graph.
- This is a custom Thread Group. need to setup Standard Plugin in /jmeter/lib/ext folder .
Adding the Stepping Thread Group from the Test Plan.
Let take a scenario as
>1,00 threads as target load
>0 seconds waiting after the test starts
>0 threads run at the immediate beginning of the test
>10 threads are added every 30 seconds with a ramp-up (or step transition time) of 5 seconds
>The target load is held for 60 seconds (1 minutes)
>Finally, 5 threads are stopped every 1 seconds.
This means
>The test begins immediately when JMeter starts, since there is 0 seconds waiting.
> Every 30 seconds 10 users will be added, until we reach 1,00 users. The first step is 1-10, the second 11-20, etc., because we defined 0 threads to run at the beginning. If we defined 5 threads to run the first step would be 6 - 16 , the second 17 - 27 etc. and the test would be completed faster.
> It will take each of the steps (with 10 users each) 10 seconds to complete. After that JMeter waits 30 seconds before starting the next step.
> After reaching 1,00 threads all of them will continue running and hitting the server together for 1 minutes.
->At the end, 5 threads will stop every 1 seconds.
>0 seconds waiting after the test starts
>0 threads run at the immediate beginning of the test
>10 threads are added every 30 seconds with a ramp-up (or step transition time) of 5 seconds
>The target load is held for 60 seconds (1 minutes)
>Finally, 5 threads are stopped every 1 seconds.
This means
>The test begins immediately when JMeter starts, since there is 0 seconds waiting.
> Every 30 seconds 10 users will be added, until we reach 1,00 users. The first step is 1-10, the second 11-20, etc., because we defined 0 threads to run at the beginning. If we defined 5 threads to run the first step would be 6 - 16 , the second 17 - 27 etc. and the test would be completed faster.
> It will take each of the steps (with 10 users each) 10 seconds to complete. After that JMeter waits 30 seconds before starting the next step.
> After reaching 1,00 threads all of them will continue running and hitting the server together for 1 minutes.
->At the end, 5 threads will stop every 1 seconds.
Concurrency Thread Group
- Maintain the level of concurrency.
- No ramp-down here.
- No Initial Delay.
- Doesn't create all threads upfront, thus saving on memory.
- Real time Preview Graph.
Adding the Concurrency Thread Group to the plan
Let’s look at the following scenario:
- 100 threads
- 30 minutes Ramp Up Time
- 10 Ramp-Up Steps
- 30 minutes holding the target rate
This means that:
- Every 3 minutes 10 users will be added until we reach 100 users. ( 30 minutes divided by 10 steps equals 3 minutes per step. 100 users divided by 10 steps equals 10 users per step. Totalling - 10 users every 3 minutes).
- After reaching 100 threads all of them will continue running and hitting the server together for 30 minutes
- 100 threads
- 30 minutes Ramp Up Time
- 10 Ramp-Up Steps
- 30 minutes holding the target rate
This means that:
- Every 3 minutes 10 users will be added until we reach 100 users. ( 30 minutes divided by 10 steps equals 3 minutes per step. 100 users divided by 10 steps equals 10 users per step. Totalling - 10 users every 3 minutes).
- After reaching 100 threads all of them will continue running and hitting the server together for 30 minutes




No comments:
Post a Comment