JMeter – Ultimate Thread Group

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 support different types of performance tests, 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 the ‘Ultimate Thread Group’ plug-in?

  1. Click on the link to download Ultimate Thread Group JMeter Plugin
  2. Unzip the folder
  3. 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
  4. 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
  5. Launch the JMeter in GUI mode

How to add ‘Ultimate Thread Group’ in the script?

  1. Select the ‘Test Plan’ node
  2. Right-click on the ‘Test Plan’ node
  3. Hover the mouse on ‘Add’
  4. Hover the mouse on ‘Thread (Users)’
  5. Click ‘jp@gc – Ultimate Thread Group’
JMeter - Ultimate Thread Group
Figure 01: Adding ‘Ultimate Thread Group’

How to configure workload using ‘Ultimate Thread Group’?

  1. Add the Ultimate Thread Group in the test plan by following the above-described steps
  2. Click on the ‘Add Row’ button to add more rows
  3. Provide the values for below input fields:
    1. Start Threads Count
    2. Initial Delay (in seconds)
    3. Startup Time (in seconds)
    4. Hold Load For (in seconds)
    5. Shutdown Time (in seconds)
  4. As you make the entry in the table, JMeter will design the workload model graph in the bottom.
JMeter - Ultimate Thread Group
Figure 02: Ultimate Thread Group

What are the input fields of ‘Ultimate Thread Group’?

  1. Name: To provide Thread Group name. It may be your Test Case/Test Scenario name.  
  2. Comments: To provide comments
  3. 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:
    1. Continue – ignore the error and continue with the test
    2. Start Next Loop – ignore the error, start next loop and continue with the test
    3. Stop Thread – current thread exits
    4. Stop Test – the entire test is stopped at the end of any current samples.
    5. Stop Test Now – the entire test is stopped abruptly. Any current samplers are interrupted if possible.
  4. Thread Schedule: Number of users to simulate.
    1. Start Thread Count: The count of threads for a particular time slot.
    2. 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 the first time.
    3. 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 the next 6th second. Likewise:
      1st user at 6th second
      2nd user at 12th second
      3rd user at 18th second
      .
      .
      .
      10th user at 60th second
    4. Hold Load For: It represents a steady state of workload Scenario. 
    5. Shutdown Time: It represents ramp-down time. same concept as Start-up time.

Example

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.

Figure 02: Ultimate Thread Group Example

Test Scenario which you can design


You may be interested: