JMeter – Arrivals Thread Group

JMeter - Arrivals Thread Group

JMeter Arrivals Thread Group element is specially created for the case where no. of orders to be submitted in an hour; is known.

For example, 2000 orders are purchased on an e-commerce every day, 1000 movie tickets are booked every hour on a movie ticket booking application, 10 licenses of software are purchased every minute etc.

In such type of scenarios, more preference is given to the quantity of order irrespective no. of users. Apache JMeter adjust the number of threads according to the target arrival rate. Now, here it is necessary to understand the arrival rate.

“Arrivals Rate” word is used for the rate of iteration (order submission). If I say 10 licenses are purchased in a minute which signifies that 10 iterations need to be started and completed in 1 minute. Hence the arrival rate will be 10/min. If I say 1000 movie tickets booking in an hour (16.6 = ~17/min), then it signifies that around 17 iterations should be started and completed in 1 minute, so arrival rate will be 17. 

One point to be noted here, I did not talk about the number of users in the above-mentioned scenarios, it means that the arrival rate can be controlled by 1 or multiple threads. In case the arrival rate is too high then you can cap the number of threads. This option is available. Another best thing about Arrivals Thread Group is all the active threads are stopped in a graceful manner at the end of the test. i.e. all the threads complete their iteration and then exit from the test. Now, let’s try to discuss more in detail.

How to download ‘Arrivals Thread Group’ plug-in?

  1. Click on the link to download Arrivals 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

How to add ‘Arrivals Thread Group’ in Test Plan?

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

How to configure workload using ‘Arrivals Thread Group’?

  1. Add the Arrivals Thread Group in the test plan by following above described steps
  2. Provide the values for the below input fields:
    1. Target Rate (arrivals/minute)
    2. Ramp Up Time (in minutes)
    3. Ramp-Up Step Count
    4. Hold Target Rate Time (in minutes)
    5. Time Unit
    6. Thread Iterations Limit
    7. Log Threads Status into File
    8. Concurrency Limit

What are the input fields of ‘Arrivals 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. Target Rate (arrivals/min): Total number of iterations to be started in 1 minute. You can also provide Target Rate in seconds by selecting ‘seconds’ in ‘Time Unit’ option given below the scenario chart.
  5. Ramp-up Time (min): Total ramp-up duration in minutes. You can also provide ramp-up duration in seconds by choosing ‘seconds’ in ‘Time Unit’ option given below the scenario chart.
  6. Ramp-up Steps Count: Total number of steps in which a group of threads (users) will ramp-up.
  7. Hold Target Rate Time (min): The steady-state when all the threads are active. This is also called as system monitoring window. If you want to monitor the system/application performance for 1 hour then the value for hold target rate time will be 60 minutes or 3600 seconds. The ramp-up time does not add to this time.
  8. Time Unit: To change the input time unit either in minutes or in seconds.
  9. Thread Iterations Limit: Maybe the purpose of this option to control the loop count, but unfortunately it does not work so you may keep it blank.
  10. Log Thread Status into File: Provide the full path of the file along with the name where you want to save the log file. e.g. C:\PerfMatrix\Result\testLogFile.log
  11. Concurrency Limit: Provide the thread count to maintain the user concurrency.

Example

Considering the above-discussed scenario. A movie ticket app gets 1000 movie tickets booking in an hour (16.6 = ~17/min). All the tickets are booked by a unique user and user concurrency will be 15.

Figure 02: Arrivals Thread Group Example

Test Scenario which you can design


Leave a Reply

Your email address will not be published. Required fields are marked *