Generic Thread Group element along with setUp Thread Group and tearDown Thread Group comes by default with Apache JMeter package. These basic Thread Group elements have certain limitations like you can not create the workload model for a spike test or step-up test using these basic thread groups. To overcome this problem and supporting different types of performance test, some external plug-ins are available which provide the option to create the desired workload and achieve the performance goal. JMeter ‘Ultimate Thread Group’ plugin is one of the external plugins which is used to design the spike test type workload model. Using Ultimate Thread Group you can apply conditional load on the server.
How to download ‘Ultimate Thread Group’ plug-in?
- Click on the link to download Ultimate Thread Group JMeter Plugin
- Unzip the folder
- Copy the file jmeter-plugins-cmn-jmeter-<version>.jar to lib folder of Apache JMeter
apache-jmeter-<version> –>lib –> Paste jmeter-plugins-cmn-jmeter-<version>.jar
- Copy the files jmeter-plugins-casutg-<version>.jar and jmeter-plugins-manager-<version>.jar to ext folder of Apache JMeter
apache-jmeter-<version> –>lib –>ext -> Paste jmeter-plugins-casutg-<version>.jar and jmeter-plugins-manager-<version>.jar
- Launch the JMeter in GUI mode
How to add ‘Ultimate Thread Group’ in the script?
- Select ‘Test Plan’ node
- Right click on ‘Test Plan’ node
- Hover the mouse on ‘Add’
- Hover the mouse on ‘Thread (Users)’
- Click ‘jp@gc – Ultimate Thread Group’
How to configure workload using ‘Ultimate Thread Group’?
- Add the Ultimate Thread Group in the test plan by following above described steps
- Click on ‘Add Row’ button to add more rows
- Provide the values for below input fields:
- Start Threads Count
- Initial Delay (in seconds)
- Startup Time (in seconds)
- Hold Load For (in seconds)
- Shutdown Time (in seconds)
- As you make the entry in the table, JMeter will design the workload model graph in the bottom.
What are the input fields of ‘Ultimate Thread Group’?
- Name: To provide Thread Group name. It may be your Test Case/Test Scenario name.
- Comments: To provide comments
- Action to be taken after a Sampler error: Actions taken in case of sampler error occurs, either because the sample itself failed or an assertion failed etc. The possible choices are:
- Continue – ignore the error and continue with the test
- Start Next Loop – ignore the error, start next loop and continue with the test
- Stop Thread – current thread exits
- Stop Test – the entire test is stopped at the end of any current samples.
- Stop Test Now – the entire test is stopped abruptly. Any current samplers are interrupted if possible.
- Thread Schedule: Number of users to simulate.
- Start Thread Count: The count of threads for a particular time slot.
- Initial Delay: Initial delay is the time for the first user (thread) to hit the server after JMeter starts. This time is nothing but just after how many seconds you want the thread to hit the server first time.
- Start-up Time: Startup represents ramp-up time and it divides among each user. If you have 10 users and 60 seconds as Start-up time then the next user will be started at next 6th second. Likewise:
1st user at 6th second
2nd user at 12th second
3rd user at 18th second
10th user at 60th second
- Hold Load For: It represents a steady-state of workload Scenario.
- Shutdown Time: It represents ramp-down time. same concept as Start-up time.
Design a spike test scenario with 60 threads as a user base. The spike should come at the interval of 2 minutes and the spike height would be 100 user load (threads). The duration of the test would be 10 minutes.