Get Knowledge from Video instead of Content:

Friday 27 January 2017

JMeter - Thread Group - "Stepping Thread Group"


In my previous blog, I have explained about basic “Thread Group” element. Basic Thread Group element has certain limitations, such as if you want to do spike test or step-up load test then you can not create such workload in the basic thread group. There are some external plug-ins are available which can help a performance tester to achieve his performance goal by creating the desired workload. I found some of the best plug-ins like “Ultimate Thread Group” and "Stepping Thread Group" which can help you to overcome from basic Thread Group limitations. You can refer my previous blog to get more information on "Ultimate Thread Group". Today we will discuss on "Stepping Thread Group" and its advantages. The distributed load can be formed by adding Stepping Thread group.

How to download “Stepping Thread Group” plug-in?
1. Click on the link to download Stepping Thread Group JMeter Plugin
2. Unzip the folder
3. Copy the file jmeter-plugins-cmn-jmeter-0.3.jar to lib folder of Apache JMeter

           apache-jmeter-X.X –>lib –> Paste jmeter-plugins-cmn-jmeter-0.3.jar

4. Copy the files jmeter-plugins-casutg-2.1.jar and jmeter-plugins-manager-0.10.jar to ext folder of Apache JMeter

          apache-jmeter-X.X –>lib –>ext -> Paste jmeter-plugins-casutg-2.1.jar and jmeter-plugins-manager-0.10.jar

That’s it!

Please note .jar file version may change in case of the plug-in update.

Apache Jmeter - Ultimate Thread Group Plugin

How to open/add “Stepping Thread Group” in Test Plan?
1. Select "Test Plan" node
2. Right click on "Test Plan" node
3. Mouse hover "Add"
4. Mouse hover "Thread (Users)"
5. Click "jp@gc – Stepping Thread Group"
Apache Jmeter - Stepping Thread Group

How to configure Work Load using “Stepping Thread Group”?
1. Once the Stepping Thread Group is added the page will look like below GIF
2. Configure the scenario on Stepping Thread Group page
3. Please refer the configuration give below

Apache Jmeter - Stepping Thread Group

How to remove “Stepping Thread Group”?
     1. Select "jp@gc – Stepping Thread Group" node
2. Right click on "jp@gc – Stepping Thread Group" node
3. Click "Remove" (Mouse) or "Delete" button from keyboard
4. Click "Yes"
Apache Jmeter - Stepping Thread Group

What are the attributes of “Stepping Thread Group”?
a.  Name: To provide Thread Group name. It may be your Test Case/Test Scenario name
b.  Comments: To provide comments
c.   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:
                         i.      Continue - ignore the error and continue with the test
                         ii.      Start Next Loop - ignore the error, start next loop and continue with the test
                         iii.      Stop Thread - current thread exits
                         iv.      Stop Test - the entire test is stopped at the end of any current samples.
                          v.      Stop Test Now - the entire test is stopped abruptly. Any current samplers are interrupted if possible.
Apache Jmeter - Ultimate Thread Group Plugin

d.  Threads Scheduling Parameters: Number of users to simulate.
1. This thread group will start M threads (Users) : Total number of users in your test scenario. These users will be distributed in ramp-up manner according to later conditions. 
where M is number of users

2. First Wait for X Seconds: Delay in second to start the first thread.
where X is the delay in seconds

3. Then start N threads: After X delay N number of users will be started

4. Next, add O threads every P seconds using ramp-up Z seconds: After adding N threads if you user count is different then you can use this field. Such number of users will be stepped-up across the test with the given ramp-up rate (Z) at every P seconds. 

5. Then hold load for: It represents the steady state of Work Load Scenario. 

6. Finally, stop Q threads every R seconds: It represents ramp-down time.

  
Next Topic:
Concurrency Thread Group

Previous Topic:
Ultimate Thread Group

Related Topics:

11 comments :

  1. Hi,

    I have run a test using stepping thread group of 10 users and add 1 thread for very 10 second's. holding time is 600 seconds. and finally stop 1 thread every 20 seconds.
    But for my case samples are around '57781'. I am seeing this sample count is Aggregate report, Summary Report and View results in Table
    *I have run the same scenario twice, i got ''57781'' samples first time and '34983' sample second time*.
    Please let me the the difference why the sample count is different and What is the sample count

    ReplyDelete
    Replies
    1. Hi Ravi,

      Could you please compare the response time of both the tests? If response time of the requests increases then you will achieve less throughput.

      Delete
  2. Even I face the same issue, fired the scenario with 5 users and VIEW RESULTS TREE shows me 20+ requests.
    Can I please know the logic how Stepping Thread works?

    ReplyDelete
    Replies
    1. Please give me full information. You can also send details on my emailID (Use 'Ask Your Queries' in the right pane bottom of the page)

      Delete
  3. Hi can we build the any mathematical formula for Ultimate Thread Group.?

    ReplyDelete
  4. Hi,
    My question is- How the next 45 users will enter into the system? What is the logic behind that and are we using 10 sec(given in example) & ramp up time for that

    ReplyDelete
    Replies
    1. Hi Pallawi,

      From where you got 45 users figure?

      Yes, you can consider ramp-up as 30 users in each 10 sec .

      Delete
    2. In above gif, for Thread Scheduling Parameter , 45 is given for - 'Next, add 45 threads every 10 seconds'

      Delete
    3. Total number of user is 150.

      1. JMeter will wait for 10 seconds
      2. Initiate 30 users with ramp-up rate 5 seconds (6 users in 1 second will ramp-up).
      3. After that JMeter will wait for 30 seconds
      4. Add 45 users with the ramp-up rate 5 seconds (9 users in 1 second will ramp-up).
      5. JMeter will wait for 30 seconds
      6. Add more 45 users with the ramp-up rate 5 seconds (9 users in 1 second will ramp-up).
      7. JMeter will wait for 30 seconds
      8. Add remaining users 30 (150-30-45-45) with the ramp-up rate 5 seconds (6 users in 1 second will ramp-up).

      Likewise all 150 user will ramp-up and form a step graph.

      Additional:
      Then all 150 users will be in steady state for next 180 seconds

      Delete