Distribution of throughput among different thread groups in jmeter - jmeter

Below is the actual volume i need to achieve in 1 hour of my jmeter load test.
Required Request/second=0.14 (520/3600)
Hence i have Throughput shaping timer with Start RPS and End RPS as 0.14 for 3600 Sec.
i have 2 thread groups.
Thread group 1 has transactions- Launch and Login.
TG1
**Thread Group**
Launch
Login
Thread group 2 has Action1 and Action2 transactions.
TG2
**Thread group**
**Action1**
**Action2**
Having all these under one thread group ,i can achieve anticipated load using combination of No Of threads required and Throughput COntroller.
But here my requirement is ,i have transactions in different thread groups.
Can anyone tell my how can i distribute the throughput for two different Thread groups.

You should be able to apply the same approach as for the single Thread Group to any amount of Thread Groups.
Throughput Controller obeys JMeter Scoping Rules so if you place it to be as a child of the 2nd Thread Group - it will not have any impact on other Thread Groups
Also be aware that in some cases it's easier to use Switch Controller for requests distribution, check out Running JMeter Samplers with Defined Percentage Probability article for more details.

If you are targeting for specific number of requests per second the best approach is to use
bzm - Arrivals Thread Group
It automatically adjusts userload and maintains target RPS levels.
You are targeting 0.14 request per second that means 8.4 requests per minute so in arrivals thread group enter 8 arrivals per minute (It accepts only whole numbers so you can round off to 8 or 9)
Enter Rampup rate steps and maximum number of concurrent users (This helps to limit max number of users )
And inside the thread group you can use throughput controllers to control your transaction executions as shown in above screenshot.
Please refer to the sample test plan from the link ( you can find it in details section of the report).

Related

JMeter run testplan for 2 hours with a maximum number of execution per hour

I have a test plan which performs creates an item (the process is more than 500 requests organizied in transaction controllers) in the application. I want to start the testplan to create 160 items with a maximum of 80 items per hour using 5 threads( each thread will select a random creator for the item using random csv Dataset)
I am using arrival thread group like this
the 1,3 arrival per minutes comes from 160 items / 120 minutes.
Jmeter will hang when I execute as above.
How could I achieve this ?
I don't think that Arrivals Thread Group is a good choice, your arrival rate is too low so the Thread Group doesn't start any threads and fails to stop them when the "Hold Target Rate" period ends. If the Arrivals Thread Group is your strict requirement I think you need to request the fix via JMeter Plugins Support Forum
In the meantime I would suggest considering switching to Concurrency Thread Group and Throughput Shaping Timer combination, the suggested configuration and the evidence of its work are in the below image:

How can I put 2 scenario's with more then 1 flow in jmeter?

Customer has 2 scenario's. Both have more then 1 flow.
For example.
Tickets
a. Buy Tickets: 1500 concurrent users
b. Browse the website: 1500 concurrent users
View
a. Flow 1: 750 concurrent users
b. Flow 2: 750 concurrent users
c. Search the website: 500 concurrent users
Scenario 1 must be run before scenario 2 can be run.
Now is my question: how can I put this in Jmeter?
Normally you should use different Thread Groups to represent different groups of business users. If you need one Thread Group to be executed before the other(s) either go for setUp Thread Group or tick Run Thread Groups consecutively on Test Plan level, this way Thread Groups will be executed upside down
If you need yet another level of distribution inside the Thread Group you can use Throughput Controller which controls how often its children will be executed. So if you put 3 flows under 2nd Thread Group you can use:
2000 threads (virtual users) in total
Throughput Controller 1 - 37.5% of threads will be executing flow b
Throughput Controller 2 - 37.5% of threads will be executing flow c
Throughput Controller 3 - 25% of threads will be searching website
Example test plan outline:
More information: Running JMeter Samplers with Defined Percentage Probability
It's important to note that, although the mentioned techniques will work in terms of configuring the number of VUsers, they will not guarantee that the Avg TPS per requests will match the same proportion. I've mentioned this in another post:
"It's common a misconception when trying to achieve a targeted percentage of requests to instantiate Vusers in the same proportion. This only works if the Avg Response Time (ART) of each type of request is the same. It's very unlikely that, for example, the search request ART will the same RT as the registration request. As a consequence, after executing the test for a certain amount of time the actual proportion of requests (of each type) will be the different than the targeted request proportion."

Increment user number with JMeter GUI

I would like to execute a loop of HTTP requests with an incrementally number of users.
For example, I want something like that :
1st loop : 1 user
2nd loop : 2 users
3rd loop : 3 users
...
Is that possible with the JMeter GUI ?
Thanks in advance !
You can achieve this effect by using the Stepping thread group plugin
You can gradually increase the number of concurrent users in JMeter. But not in the way you are actually asking ie, every loop / iteration!
Simply - You can not change the thread count within the test once the JMeter test has started running . But you can use variables for the user count and supply to the test before the test starts.
To gradually increase the user count, you can use any of the below thread groups
You can use the regular thread group, ramp-up period. 100 users and 1000 seconds ramp up period, will add 1 user every 10 seconds.
Stepping Thread Group
Ultimate Thread Group
Actually JMeter doesn't allow this, however you can work it around using different approach, for instance if you stick to Requests Per Minute rather than to Virtual Users.
You can use Constant Throughput Timer to set desired initial throughput (i.e. N requests per minute) and increment it by desired factor each Thread Group iteration.
Despite word "Constant" in its name the throughput doesn't have to be constant, it can be a JMeter Variable or Function or JMeter Property.
Reference material:
How to use JMeter's Throughput Constant Timer
Beanshell Server
Throughput Shaping Timer - an advanced version available via JMeter Plugins, has some extra scheduling capabilities.

Jmeter-Thread- how to run set of user at fixed interval of time

Hi i want to run a performance test in which i want to load say 10 users in first second and wait for 2 minutes then load next 10 set of users and again wait for 2 minutes then again 10 users in the same Test plan is it possible
For this purpose "Stepping Thread Group" is the thing you need. And to fix or control the number of samples to execute you can use "Constant Throughput Timer".
Constant Throughput Timer will let you control the flow of requests to be sent."Stepping Thread Group" or default "Thread Group" only control the way the users or threads will be generated.It doesn't control the rate of requests to be hit your application.So for this purpose, you could use "Constant Throughput Timer" to control your requests per second.
For further detail, you could go through JMeter documentation.
http://jmeter.apache.org/usermanual/component_reference.html#Constant_Throughput_Timer
If you are using JMeter, then Stepping Thread Group is what you are looking for.
Features of Stepping thread group are :
1. preview graph showing estimated load
2. initial thread group delay to combine several thread group activities
3. increase load by portions of threads (users) with ramp-up period
4. configurable hold time after all threads started
5. decrease load by portions
Following screenshot shows Stepping Thread Group set to generate load increasing by 10 users each 2 minutes:
Stepping Thread group
If you plan to increase your user/thread at a constant rate, the Stepping Thread Group helps. You can read more about it at :
http://jmeter-plugins.org/wiki/SteppingThreadGroup/
But if you plan to increase your load at a non-constant rate, for example, if your plan is -- start 10 threads in first 5 seconds, wait for 10 secs and start 5 threads, wait for 15 more secs and start 15 threads , then you can use Ultimate Thread Group.
I won't write more about Ultimate Thread Group, since I will limit myself to the question asked. If you are more interested about it, you can read it over at JMeter Plugins site.

JMeter Thread Communication Pre and Post Process delay

My Test Plan have 3 Scenarios,
Submit Quote
Check Status
If Status Complete get Quote Details.
If I keep all these 3 scenarios in one thread then CTT is not putting constant throughput, when I remove create 2 thread 1 for Submit and other for Status and Get Details I am able to maintain CTT, but my 2nd and 3rd Scenario volume drops almost 50%. As I have dependency on 1st step I am using Thread communication and not sure how I can either get CTT in one thread or get same volume from 2 different threads.
Constant Throughput Timer is useful to shape the load where there is > 1 test iteration. If your thread group has only one iteration consider using Throughput Shaping Timer instead or play with ramp-up and thread number values. It is recommended to have only one instance of the CTT in your Test Plan as it's rather resource consuming by nature.
If your scenario assumes different throughput for different thread groups you can add a CTT per Thread Group (make sure that you select All active threads in current thread group (shared) in "Calculate Throughput based on" dropdown
If ITC test elements are throttling your test below desired throughput value consider using
__setProperty()
__property()
__threadNum()
functions to implement inter-thread communication instead. JMeter Properties are global, can be accessed from different thread groups and persist all the time while JMeter is running.
See How to use JMeter's Throughput Constant Timer for details.
If above information is not enough try to elaborate your query and include i.e. thread numbers, target throughput and what kind of information needs to be shared across thread groups.

Resources