A standard Thread Group gives us a platform to setup configuration related to your performance test execution. But, suppose you wish to perform load test for 500 virtual users where in single execution different User slots(250, 100, 150) follow separate Ramp-up Time(Startup time), Ramp-down Time(Shutdown time) & ‘Hold Load for’ time. A standard thread group is not capable of fulfilling such requirement. To apply such conditional load on server we have to use Ultimate Thread Group. Using Ultimate Thread Group you can define initial delays and setup duration of your run.
How to Configure?
Ultimate Thread Group is the feature of Jmeter Plugin to test distributed load on server. Please follow below steps to get it installed for your Jmeter installation:
1) Download standard set of plugins from this URL: https://jmeter-plugins.org/
2) Extract the Zip file on desired location and copy the JAR file contained in lib\ext folder.
3) Paste the JAR file to $JMETER_HOME/lib/ext directory.
4) Copy all the JAR files contained in lib directory of the extracted location to $JMETER_HOME/lib folder.
5) Restart/Launch JMeter and it’s done.
How to Add Ultimate Thread Group?
1) Open JMeter and right click on Test Plan.
2) Right Click on Test Plan > Add > Threads(Users) > jp@gc Ultimate Thread Group.
You can also see more options added to the list like: “bzm – Arrivals Thread Group“, “bzm – Concurrency Thread Group“, “bzm – Free from Arrivals Thread Group“, “jp@gc Stepping Thread Group” & “jp@gc Ultimate Thread Group“.
Understanding features of Ultimate Thread Group
Let’s look at the screen of Ultimate Thread Group first.
Below are the configurations settings you can see under Ultimate Thread Group window:
– Action to be performed after a Sampler hits an error
– Thread Schedule
– Elapsed Time Vs Number of Active Threads Graph
1) Action to be performed after a Sampler Error
As the name implies, this option tells Jmeter what to do if the execution hits an error because of sampler failure or assertion failure. Jmeter gives you 5 choices to handle the failure of a sampler, and they are “Continue“, “Start Next Thread Loop“, “Stop Thread“, “Stop Test” & “Stop Test Now“.
By default “Continue” option is selected. Now let’s look at the significance of these options.
– Continue : Jmeter will ignore the error, continue the execution and only affected sampler gets failed in the listener.
– Start Next Thread Loop : Jmeter will ignore the error and continue with the execution of next thread loop.
– Stop Thread : Execution of the current Thread will be stopped, remaining threads will be executed as defined.
– Stop Test : Entire Test execution will be stopped if any sampler hits an error.
– Stop Test Now : Test execution will be stopped abruptly and all currently active samplers will be interrupted to end the execution.
2) Thread Schedule
Ultimate Thread group provides a very interesting way to schedule your thread activities. You can see a table with columns: “Start Thread Count“, “Initial Delay, sec“, “Startup Time, sec“, “Hold Load For, sec” & “Shutdown Time“. Also there are buttons below the table to “Add Row“, “Copy Row” & “Delete Row“. Let’s understand the significance of each field and their use in real time execution.
– Start Thread Count: Here we can define the amount of threads to load in single set. Thread will start one by one until it reaches the count defined per row. Let’s say we have defined 20 Thread Count in first row then we are going to load 20 users first.
– Initial Delay, Sec: This time decides after how many seconds we want to hit the server for the first time.
– Startup Time ,Sec: This works as a Ramp-up time for threads to hit the server. Start Up Time is divided among each user(Start Thread Count/Startup Time). So if we have defined Start Thread count = 50 & Startup Time = 10 that means we are giving 5 seconds for each thread to hit the server. This configuration is applicable for a single row.
– Hold Load For, sec: After all the threads are activated from the single row, JMeter will hold the load upto defined seconds.
– Shutdown Time: After the Hold Load time period is over, JMeter will shutdown all the threads withing defined shutdown time period.
– Add Row / Copy Row / Delete Row: To add, remove slots of Thread configuration. Here, each row is a separate slot.
– As you can see in above image we have added 3 rows with Thread count as 10, 20 & 30.
– Initial delay for all 3 rows is kept same as 10 seconds.
– So after initiation of execution, Jmeter will wait for 10 seconds to send the 1st thread to the server.
– Startup Time is also same as 10 seconds. Hence, within 10 seconds all 60 Users will be sent to the server.
– Now Hold Load Time is different for each row: 50, 100 & 150 seconds. So after 50 seconds of Startup time we will have Ramp down of threads defined in 1st row. As you can see, we are getting our first ramp-down at 1.10 mins (10+10+50 secs).
– Similarly other Ramp-downs will occur as per the defined configuration.
With use of Ultimate Thread Group you can take entire control of your performance test execution by configuring infinite number of schedule records & separate ramp-up time, shutdown time, flight time for each schedule record. You can generate variety of load patters based on your requirement and also configure perfect Spike Test.