I have a test plan like following
Thread Group
- Http Request 1
- Http Request 2
- Http Request 3
Does anyone know how can I achieve 100 req/min for Http Request 1,40 req/min for Http Request 2 and 10 req/min for Http Request 3
I tried throughput controller but that is only running for 1 min but I need to run all those request each min for 30 mins
There are multiple ways to achieve the desired load. The most easy and "safe" solution would be to split the HTTP request in their own Thread-group if possible.
Then add a Constant Throughput Timer in each thread group and configure this to the desired Request per minute. Have a look a the documentation about this module Jmeter User's Manual, there are multiple setting for this controller to achieve the desired load.
Easiest way to achieve this is:
Create Separate Thread Groups for each HTTP Request
Change your Thread group properties as per your Requirement,
Like for Http Request 1 - Number of Threads = 100, Duration - 60 seconds
Related
I am new to jmeter, and I would like to do a test in which I send 500 requests per second, this for 10 seconds
The configuration I have is:
I would like to know if my configuration is correct or it can be done better
Your configuration means:
5000 users will be kicked off in 10 seconds, i.e. each second 500 users will be started
Once started the users will start executing Samplers upside down
The actual number of requests per second will depend on the application response time.
In your case you will only be able to achieve 500 requests per second if your application response time will be 1 second precisely. If it will be more - you will get less requests per second and vice versa.
If you need to send 500 requests per second for 10 seconds sharp I would suggest using Concurrency Thread Group and Throughput Shaping Timer combination.
The Throughput Shaping Timer needs to be set up like this:
And the concurrency thread group like this:
The configuration is for example only, in your case the number of threads required to conduct 500 request per second load might be different and again in mainly depends on the application response time.
I Want to make a test case to send 50,000 Requests with 400 RPS using Jmeter.
I have been suggested to use combination of Concurrency thread group and Throughput Shaping Timer for this use case and I have tried following from the following link: https://www.blazemeter.com/blog/using-jmeters-throughput-shaping-timer-plugin.
Here the problem is I only get ~28K responses recorded in csv instead of 50K.
I need to make 400 RPS irrespective of the request sent the previous second
I also need to have time difference of ~1sec for each 400 rows so that I can confirm 400 requests are sent every second.
Any Other suggestions to achieving the same result are also okay.
I have used 400 as start and end rps and duration of 125 second considering 400 * 125 = 50,000
I have attached the image of my concurrency thread group too
In order to be able to send 400 RPS with 400 threads your application must respond in 1 second or less because JMeter waits for the response from previous sampler before starting the next one. If your application response time will be 2 seconds - you will get 200 RPS, 4 seconds - 100 RPS, etc.
If your application response time is higher - you need to increase the number of threads proportionally, your 40 spare threads might be not sufficient.
Also JMeter needs to be able to send requests fast enough so make sure to follow JMeter Best Practices and go for Distributed Testing if needed
If your application under test cannot handle 400 RPS - there is nothing you can do from JMeter side, you can only identify the bottleneck and either report it or fix it yourself prior to re-running the test
Have single HTTP Request, since ramp-up time is zero, all 2000 request will ramp-up in zero second.
Question:
Since Loop count is given infinite again 2000 request will be sent or 1 request will be sent after successful response, another request will be sent for infinite time
Flow 1:-
2000 request in 0 Ramp-up time.
1 request - success response - again next request - Infinite time
Flow 2:
2000 request in 0 Ramp-up time.
2000 request - success response - again 2000 request - Infinite time
In above two flow mentioned, can anyone tell which is the correct flow.
You're not running 2000 requests, you're running 2000 users.
JMeter will start 2000 users at the same time and each user start executing your HTTP Request sampler as fast as it can. You can see the number of requests over time using i.e. Transactions per Second chart
If you want to execute 2000 requests one by one - change your Thread Group settings to
If you want to execute 2000 requests at the same time - change your Thread Group settings to:
it's also a good idea to add a Synchronizing Timer
What I have tried so far
Creating 100 Thread Groups which has 20 different HTTP Request listeners each,
so total 100*20 => 2000 unique different http requests..
Each Thread Group configured with
Number of Threads = 1
Ramp-up Period = 0
For Test Plan Unchecked Run Thread Groups Consecutively
Problem: Total 2000 requests are making in span of 10 - 20 seconds, but I want to make the all requests
simultaneously, or at least in span of 1-2 seconds is ok
Put your HTTP Request samplers under a single Thread Group, you don't need to have different Thread Groups with 1 user (or at least going forward consider using Module Controller to avoid code duplication)
Add Synchronizing Timer at the same level with HTTP Request samplers and set Number of Simulated Users to Group by to 20
Threads are supposed to bring you concurrency, not ThreadGroups. Those are meant to model different user behaviours.
Please try 1 ThreadGroup with 100 Threads.
Depending on what exactly your use case is, you could then put all the listeners into one Random Controller inside the ThreadGroup. Our you could use any other controllers that suit your needs.
Set time gap/timer between 'foreach controller' requests.
We have a below scenario:
Login single user>click question multiple times
To achieve above scenario in Jmeter used below Test Plan:
ThreadGroup - 1 user, 1 ramp up period, 1 loop
-HTTP request to login
-Questionslist - RegExp to get list of questions with -1
-ForEach Controller - 100 times loop count
--HTTP request
When 'Timer' is set under 'ForEach controller' doesn't actually considered this timer value (ex: 2000 milliseconds)
Please guide how to have time gap between 'ForEach controller' http request.
Actually Constant Timer should work however you will not see this delay anywhere as by default the duration of PreProcessors, Post-Processors and Timers is not included into Sampler time.
You could put your HTTP Request and the Timer under Transaction Controller and configure it to:
Generate Parent Sample
Include duration of timer and pre-post processors in generated sample
This way you will get Timer time (2 seconds) added to your Sample Result.
However above approach is on per-user basis, it means that each virtual user will have a 2-second delay between HTTP Request. If you would like to have 2 seconds of absolutely idle time, i.e. when no requests are being made at all you can add a Test Action sampler after HTTP Request sampler and configure it to produce a 2000 ms delay. Also put Synchronizing Timer as a child of the Test Action sampler and set Number of Simultaneous Users to Group by to be equal to the number of virtual users in Thread Group - this way Test Action sampler will act as a rendezvous point and all the virtual users will "meet" there to "sleep" together for 2 seconds.