Flexible Thread Scheduling
A guide for Flexible Thread in JMeter
There is a plug-in for JMeter that we can use to increase or decrease the number of threads at a scheduled time in JMeter tests.
The Ultimate Thread Group provides flexible thread scheduling to your test scenario. It allows you to create a scheduled thread with advanced configuration.
Available scenarios with the Ultimate Thread Group are as following:
- Multiple scheduled records can be defined
- Start Threads Count, Initial Delay, Startup Time and Hold Load Time can be defined separately for each record
- Scheduled load preview can be displayed on the chart
- The test will start with 70 threads
- At the 20th second of the test, 200 threads will be reached by adding 130 threads with a 4 second ramp up.
- After working with 200 threads for 25 seconds, 130 threads will be closed.
- In the 60th second of the test, 150 threads will be reached by adding 80 threads with a 4 second ramp up.
- After working with 150 threads for 25 seconds, 80 threads will be closed.
- Continue with 70 threads until 2 minutes are completed.
To make it more understandable, we have marked the area that each record covers on the chart.
Note: Threads are automatically closed when the given hold load time is complete. If there are threads that are not closed, there are thread blocking operations.
Required configurations on the “New Tests” screen for the JMeter test scenario using ultimate thread group:
- Thread Count value should be calculated and entered at the maximum thread number that will run simultaneously. For example: In the example above, max 200 threads will work in one engine at the same time.
- Duration value should be set according to the timeline in the ultimate thread group preview graphic. It’s not a problem that the time determined is more than the ultimate thread running time. Testing will end automatically when threads are finished.
- Iteration and Ramp up Time values are managed by the Ultimate thread group plug-in.
- The Engine Count value should be set accordingly as many as the number of engines requested.
Thread group values in the Ultimate thread group are not updated with the interface. You must do the necessary thread group config in jmx. You can save and run the test.
Report resulting from the above test:
Enjoy load testing!
If you don't see the answer to your question here, please reach out to us to let us know! We're always improving our documentation.