I am trying to run my JMeter script with the below scenario design
Test scenario 50 min ramp up time test duration 1 hour and 25 mins for ramp-down
My jmx contains the below elements (adding ramp-up 3000(50 mins)
Normal thread group (up to 500 users)
Login (once only controller)
runtime controller (1 hour + 50 mins ramp up)
Logout(once only controller)
Now my question is how can I achieve this scenario using a normal thread group as I am using runtime controller so I am not able to use ultimate or other thread groups .
Is there another thread group or idea to achieve it in JMeter?
Since JMeter 5.5 there is Open Model Thread Group which allows you to more or less flexibly define ramp-down periods
Related
I am curious why the elapsed time of the current running test in JMeter is not accurate?
I set my thread group to the following specs:
Number of threads - 2;
Ramp-up period - 1;
Loop count - 60
I suppose that means that every second 2 users will perform some actions and the step will be repeated 60 times. Which means it will take 60 seconds to complete the test.
But the elapsed time of the current running test shows 25 seconds. Why it's less than 60 seconds? How can it be that my test is completed so fast?
JMeter acts as follows:
Each thread (virtual user) starts executing Samplers upside down (or according to the logic controllers) as fast as it can
When there are no more Samplers to execute (or loops to iterate) the Thread is being shut down
Your configuration means that 2 users will execute samplers 60 times, the elapsed time depends on:
how fast JMeter can send the requests
how fast your application can respond
If you're looking for a configuration where 2 threads are executing samplers for 60 seconds - amend your Thread Group setup as follows:
If you have troubles in setting up the workload model it might be easier to use a Custom Thread Group for example Ultimate Thread Group which provides extreme flexibility when it comes to ramp-up, ramp-down, time to hold the load definition, etc.
These "custom thread groups" can be installed using JMeter Plugins Manager
The requests inside your test will be executed 60 times using 2 concurrent users
For example if you have 1 request which takes 1 second it will take around 30 seconds:
Total 60 requests * 1 seconds (time per request) / 2 (concurrent) users = 30 seconds
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:
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).
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.
I am new to jmeter, I want to create a report, I have following doubts:
I want to find out the maximum number of users that can be given in a thread for ramp-up time 1sec?
Ex: 5 simple Http Request
no of user : ?
Ramp up time = 1
Loop=1
How to set a proper ramp-up time depending on the number of user in a thread?
Ex: 5 simple Http Request
no of user : 100
Ramp up time = ?
Loop=1
I tried different combinations of ramp-up and number of users considering through put , but the results varies and not able to find out a relation with the ramp-up time and the number of users.
Please help to find a solution for it.
Thanks!
Ramp-up period is the time required for all threads representing virtual users to start.
JMeter starts with 1 user and kicks off another thread so all threads will start in ramp-up period time slot i.e.
10 users, 10 seconds ramp-up - start with 1 user, each second 1 user added
10 users, 20 seconds ramp-up - start with 1 user, each 2 seconds 1 user added
100 users, 50 seconds ramp-up - start with 1 user, each second 2 users added
Keep in mind that if the thread has finished its job and there are no loops defined it'll shut down. For JMeter greenhorns it's better to use Ultimate Thread Group (available via plugin) which provides easy-understandable and configurable load pattern definition.
Depending on what you're trying to achieve you can also use the following test elements:
Synchronizing Timer - to hold the threads until specified number will be reached and release them at the same moment
Constant Throughput Timer - to specify exact load in requests-per-second.
Hope this helps.