JMeter - Keep current Threats Active - jmeter

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.

Related

How to provide jmeter thread group , Ramp up peridod and Loop count?

I'm new to jmeter I have the following scenario. I want the jmeter to hit the given url, I have 13 such url in a csv file.
I want to hit the url at the rate of 2 requests per second for a given time period of 60 seconds.
In this case how should I specify my thread group, Ramp-up period and Loop count.
I understood the basic like 10 thread with 10 second rampup with a loop count of 1 will run 1 request per second for 10 user. But I'm not sure how to specify when we have 13 such urls.
Atleast any link for the given scenario is appreciated.
I understood the basic like 10 thread with 10 second rampup with a loop count of 1 will run 1 request per second for 10 user
not necessarily, JMeter waits for response from the previous Sampler prior to executing the next one, the configuration means that JMeter will start 1 user each second, it doesn't guarantee 1 request per second.
The easiest way of achieving X requests per second throughput is using Throughput Shaping Timer
Make sure to supply the sufficient number of Threads, i.e. if your application response time is 1000ms - 2 threads should be enough, if it's 2000 ms - you will need at least 2 threads, etc.
There is a special thread group: Concurrency Thread Group which can be connected to the Throughput Shaping Timer via Feedback Function so it will automatically kick off extra virtual users if the current amount will not be enough in order to conduct the required load.

Is there any way in jmeter where i can add delay time between half requests in Jmeter?

I want to send 100 users in 5 seconds and my loop count is 1, but i want to add delay time of 10 seconds after 50 users then remaining 50 users will hit.
Please help me with some suggestions.
You Can use Stepping Thread Group to perform the action required. By Configuring the steps according to your requirement.
Your requirements are mutually exclusive, first you're talking about 5 seconds and then you need 10 seconds delay which brings us to at least 15 seconds plus your application response time.
The easiest option would be going for Concurrency Thread Group or Ultimate Thread Group where you can easily set up whatever workload you want.
Alternatively you can go for the:
Flow Control Action sampler - to introduce the 10-seconds delay
Synchronizing Timer - to act as a "rendezvous" point for the virtual users

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.

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

Test Duration when we execute JMeter Test with 1 user and more

I have concerns about the duration of executing JMeter Test Scenario.
In fact, if we execute a manual test with 1 user in 1 hour, we will find the same duration or little more with 3 user.
But, with JMeter test the duration with 1 user will be multiplied by the number of users.
During my scripting with this tool, I've noticed that JMeter always wait for the response of the request to pass to another request. It's like we have 1 user doing the work of multiple users.
Does any body have explanations about this issue?
Can we configure JMeter to perform like we have x users working in // ?
Depends how you are simulating users..
Each thread will wait for a response, but users are represented by different threads, and threads do not wait for each other to complete samples, they are independent.
If you are using threads in thread group to represent users (which is the intended usage), the threads will start concurrently and run independently, so you should see the 3 users complete in an hour, as with manual tests. If this is not happening, then you should check the resources used on the client running jmeter during single thread and multi thread runs. Or perhaps the bottleneck may be in the transport (ie bandwidth). All you have determined so far is that the bottleneck is prior to the server, you need to determine where it is.
It is also possible you have created a thread group for each simulated user. If this is the case you can set the groups to run consecutive or concurrent. The setting for this is on the Test Plan element at the very top of the tree. You want concurrent, so untick 'Run Thread Groups Consecutively'.
So it comes down to how you are simulating users.
In ideal world if you test your site with 1 user all set of actions completes in 1 hour. If you add another 100 users - still one hour, 1000 users - 1 hour.
In real world server response time increases with the number of concurrent threads. But it isn't something like
1 user - average response time 10ms
2 users - 20 ms
3 users - 30 ms
But
1 user - 10 ms
2 users - 10 ms
3 users - 10 ms
10 users - 11 ms
The whole idea of the performance testing is to determine the upper limit of server load and identify bottlenecks and issues which happen under the load so you could state something like: using this hardware and this configuration the application is capable of serving 500 concurrent users without serious delays. In case of 1000 users response time will be more than 15 seconds.
In regards to threads, JMeter thread starts, executes samples one by one for defined amount of loops and exits. It is applicable for each thread which are independent. Basic throughput control can be done via ramp-up and loops count (see Thread Group documentation on details)
More advanced load scenario definition can be done using following Test Elements:
Ultimate Thread Group - which provides easy visual way of defining ramp-up, ramp-down and time to hold the load
Constant Throughput Timer - to set desired load rate in requests per minute
Synchronizing Timer - to pause all the test threads and release them at the same moment to produce a "spike"

Resources