In our application total 500 users I want 10 users hit request same time . How to achieve it?
I also used Synchronizing timer and uniform random timer for delay and waiting for user .
can I use both timer in one group?
If you want to execute a certain request by 10 users at the same time - add a Synchronizing Timer as a child of this request and set "Number of Simulated Users to Group by" to 10
Uniform Random Timer can be used in combination with Synchronizing Timer, it will add the configured delay before each Sampler it its scope so if you want to apply the delay before each request - put the Uniform Random Timer just under the Thread Group
Related
Im just begining with stress tests in Jmeter and have following problem. I want to call 50 times at once (50 users) for one endpoint ss1. When I just leave empty "Ramp-up period" these calls have very small delay but still have - intention is to calls it at exactly the same time ss2
If you want the request to be sent at exactly the same moment with 50 users - add a Synchronizing Timer and set the number of simulated users to group by to 50 (or whatever it the number of threads in your Thread Group)
More information: Using the JMeter Synchronizing Timer
For the given scenario in sample scenarios image with duration 1hr , i tried to set the work load model as given below with the request hits 40000 and TPM 667:
Test Plan
thread group
Loop controller
Constant throughput timer
JSR223sampler1 (sleep time 3000ms)
JSR223sampler2 (sleep time 3000ms)
JSR223sampler3 (sleep time 3000ms)
JSR223sampler4 (sleep time 3000ms)
summary report.
Since I am new to the Jmeter i am not able to set the values properly... Can anyone help me?
Thread Group needs to be set up as:
Loop Controller should be allowed to iterate infinitely:
Constant Throughput Timer should be applied to all active threads in the current Thread Group and the Target Throughput should be 667.0
The above setup should fulfil the requirements for your scenario. Also be aware that sometimes the defined number of virtual users might be not enough to reach/maintain the desired throughput, in such cases it makes sense to consider using Concurrency Thread Group and Throughput Shaping Timer combination.
I am trying to run the same thread group after a certain interval. Example -
JMeter will run thread group A and execute all http requests inside it and let's say for example after 20 sec it will run thread group A again and this loop should carry on until I manually stop the script.
What I have designed right now is something like this-
Thread Group A
While Controller (I gave some condition so that it is always true)
Http request 1
Http request 2
Constant timer (20sec)
but this only puts 20sec delay between each http call.
Replace Constant Timer with the Test Action sampler, keep all defaults and set "Duration" to 20000 milliseconds
Add Syncrhonizing 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 threads in your Thread Group
That's it, synchronizing timer will act as a "rendezvous" point so all your virtual users meet there and wait for 20 seconds together.
You might also be interested in How to Easily Implement Pacing in JMeter in order to be able to configure more complex delay scenarios
I have a scenario in which I want to hit first request with 3000 users and wait for all the users to come at a point and hit the second request at a same time.
How can this be achievable in jmeter.
JMeter's equivalent of rendezvous point is Synchronizing Timer. Add it as a child of the request you need to execute by all users and use 3000 as the "Number of Simulated Users to Group By"
You could write the first request in its own ThreadGroup wich loops 3000 times, then the 2nd request in an other ThreadGroup.
If you tick the Run Test Group consecutively check-box on the Test Plan configuration screen:
Then what you ask will happen.
You'll have to pass the user states somehow, maybe using variables?
Alternatively you could have a global variable user_setup_count and an absolute rendez_vous_time, to be used like this (for each Thread, in a single ThreadGroup):
Perform request1
Increment user_setup_count - Set rendez_vous_time to now + 20s
while (user_setup_count <3000) { Not everyone is ready yet!
Sleep for 5 sec
Sleep exactly until rendez_vous_time <-- Synchronization is here
Perform request 2
etc.
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.