Jmeter ramp up distribution - jmeter-5.0

I wanted to try the following scenario in jmeter. I was wondering if someone could help me with this.
Lets say i want to run a test with 40 users for an hour but i want it to run for the below use case:
I want 10 user to ramp up in 0 seconds (start together) and run for 15 mins and keep on running.
After 15 mins i want another 10 users (total user count is 20 now) to do the same (start all tog-other ) and keep on running.
So in the end of this test there will be 40 users running but i want the add 10 users every 15 mins and have them run till the end of my duration.
How can i achieve this in jmeter? Thanks!!

The best way to achieve this would be to use Ultimate Thread Group.
You can download it here
https://jmeter-plugins.org/wiki/UltimateThreadGroup/
The link bellow should give you an understanding of how to use the Ultimate Thread Group.
http://www.testingjournals.com/ultimate-thread-group-jmeter/

Related

JMeter - Keep current Threats Active

I want to ask a question regarding of how to perform my load test scenarios. I have multiple threat groups that each one executes a scenario (get,post,put requests) with a different number of threats on each scenario. Each scenario takes an X (unknown) of time to be execute always depending of how many requests it has. What i want is to run them all together and hold the load (keep threats active) for a specific amount of time.
Let me give an example:
Threat Group 1 - v. users 75
Threat Group 2 - v. users 50
Threat Group 3 - v. users 30
I want to execute all threat groups together and keep the load for 30 mins. The problem that i have its lets say that threat group 1 it takes only 2 mins to be executed, threat group 2 takes only 3 minutes and threat group 3 takes only 1 minute. I can not have the Infinite option tick as i have only specific number of data that i can use. For the first scenario i have 75 users (data) that if they execute the scenario once they can not execute it again thus i need 75 more (data) which i dont have.
Is there any way to do that? Is it feasible to keep threats alive in each threat group for specific amount of time? Or something that will execute the requests in a specific amount of time that will cover the whole duration? (30 mins)
Setting up the parameters in threat groups like the picture below when each scenario ends it shuts down its threats so i will never have lets say 30 v users to run in parallel for a specific amount of time.
The below graph shows that Scenario 1 (pink) ended its threats faster than Scenario 2 (ref). Here the settings are the following:
Threats in each scenario 5
Ramp-up 10 secs
Duration 90 secs
If I understand correctly you are constrainded by data and you have one data point for one loop per user . So I will try to manipulate rampup and set it to 1800 and loop = 1 for every thread group. Uncheck "specify thread lifetime". Jmeter will run new thread e.g for TG_1 every 1800/75 second. Whole test will run 1800sec + time for loop for last thread. If have to tink if this load profile is appropriate for your application.
As I can understand your query, you have data for say 75 users, the data cannot be repeated. And you need to hold the load for 30 minutes.
In simple words, I can say that you cannot hold the load for this much time unless you have more data, or you can repeat data.
If 75 users are taking only 1 minute or even 5 minutes, this means that you have not added human reaction time. To add that, you can simply use timers. Which will delay the execution of sampler.
If your first thread group executes 75 requests in 2 minutes and you want it to be executed in 30 minutes the only way of achieving this is making JMeter 15x times slower. JMeter provides a variety of Timers and each of them allows introducing delays between requests mainly to simulate real user "think time"
75 requests in 2 minutes is approx 37 requests per minute and if you need to make it 15x times slower you need to execute ~2.4 requests per minute.
So you can add i.e. Constant Throughput Timer to your first thread group and configure it like:
this way you will get 72 requests in 30 minutes.
Similarly you can slow down 2 remaining thread groups
Try with Ultimate Thread group plugin
Use different ultimate thread group and change the threads as per your requirement but keep other parameters same as shown below.
So, your threads will vary but other condition probably will remain same. Like Initial delay, startup time, holdloadfor sec and shutdown.
You can use plugin manager to download the jpgc#stardard set for all the plugin provided by jpgc. Then, you will get option to add jpgc ultimate thread group from Threads(Users) or from the same place we add normal/standard threadgroup.

How to calculate load profile and choose thread group in Jmeter

I have a task to create profile load on the app. Profile load: Vuser 7 , 50 requests per hour. Create load dinamics: ramp-up 2 min , loading 20 min , end of loading 2 min. How to calculate this and choose thread group(and timer)?
Your test looks rather weird as 50 requests/hour is less than 1 request per minute and it is unclear why do you need 7 users and ramp-up/ramp-down periods.
No matter.
The easiest way of implementing your "load pattern" is using Ultimate Thread Group. It is not a part of normal JMeter distribution, you need to install it using JMeter Plugins Manager. The relevant configuration would be something like:
The easiest way of slowing down the requests to 50 request per hour is using Precise Throughput Timer, the appropriate configuration for your scenario would be:
You can check the actual throughput and the number of executed samplers using i.e. Aggregate Report listener. Given your test scenario lasts 24 minutes you should have around 20 sample results.

Increase users in Jmeter

I need in Jmeter increase a group of user. For example, increase 10 users every 20 seconds.
Somebody knows how to do that ?
Thanks in advance.
There are 2 ways to achieve that,
If you want to test with total 100 users with 10 users coming up in every 20 seconds then you can set your ramp up as 200 seconds
Ramp up : 200 seconds
Total users : 100
This will start 10 users every 20 seconds which you need. (In this no external plugin is required)
Use stepping thread group which allows similar functionality. you can get from Stepping Thread group - JMeter plugins
Check http://jmeter-plugins.org/wiki/SteppingThreadGroup/.
You have to install http://jmeter-plugins.org/downloads/file/JMeterPlugins-Standard-1.2.0.zip for that.

how to simulate 1000 concurrent user using jmeter

Is that possible to simulate 1000 to 10000 user to jmeter?
If so how?
in 1 thread group only test 1k user:
Thread user = 1000,
Ramp up = 10 ,is this means it will test 1000 user in 10sec?,
Loopcount = 1, is there a disadvantage if I put 10 here ,is this means 1000x10 user = it will simulate 10k user?
Is 1 thread group can simulate 1000 concurrent user?
I could have written it as comment, but it went out of characters.
definitions given by #Quality-Expert are correct but his understanding of your test setup is wrong.
10 loop count doesnt mean 1000*10
It means at a given moment only 1000 concurrent users will be present but they will perform same action 10 times. It doesn't mean 10000 users.
Rampup is 10 doesnt mean 1000 users for 10 seconds
It means 100 users will come online in 1 second and next 100 users will online in next second i.e. in 2 seconds 200 users will come online and this is how 1000 users will come online in 10 seconds.
If you dont provide any test duration test will end their itself, it wont continue after threads have finished their task. If you want to load test with 1000 users then provide some test duration i.e. 10 mintues. Thus test will run with 1000 concurrent users for 10 min. Rampup is just warm up time for system under load test so that it wont face sudden load of 1000 users.
About 10000 load, use need to use distributed set of machines/client of Jmeter which will generate that load or use cloud load testing tools.
Number of Threads- The maximum number of users you want to run.
Ramp-Up Period - Defines how long it takes for JMeter to ramp up from zero users to X number of threads. It is in terms of seconds.
Loop Count - Defines how many times you want each user to run your script.
Other thing is that No. of user depends on your machine CPU , RAM , Physical memory. As far as I know using normal system you can user 250-500 max. users.
If you want to do testing like 1k,10k users then you will have to use cloud systems like Neoload.
As per your given example , you are right about if you put thread user = 1000 & ramp up = 10 then it will run test till 10 seconds for 1000 users.
Let me know if you have still any confusion.
Answer for the above question in below screen, in Jmeter manual its different which says threads/ramp-up period= user per seconds

Using JMeter for availability testing

My goal is to fire a thread every 15 minutes to a website with some actions (e.g. intro, choose_language, search_term). Where I will assert using a Response Assertion to check whether the site is available.
Is it possible to schedule JMeter like this from within JMeter itself? Is it possible using any of the timers? I am thinking of starting my script using the Windows Scheduler as a plan B.
I thought I would be able to set it with the Ramp-Up in the Thread Group. My thought was:
Number of Threads (users): 1
Ramp-Up Period (in seconds): 60
that this would mean that 1 user would be started every 60 seconds, but this seems not to be true.
To do what you want,
You can use one user, and within a debug sampler at end of (login, intro, search) add a timer that last 15 minutes.
You misunderstand rampup, with what you set it's useless as there is only 1 user. With 15 users, it means, start each of these 15 users within 60 minutes then once started it is not used anymore

Resources