Using JMeter for availability testing - jmeter

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

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.

Loop count and Ramp Up period in JMeter

I have created a set and just confused with the Loop Count and Ramp Up period.
I have a test set with the following parameters.
Threads = 30
Ramp Up Period = 30
Loop Count = 100
As per the page on
quora.
I suppose:
a) If Loop count is Zero, then each of the 30 threads will be starting every second. As per the shared the web page, I guess 30/30 * 100 ie 100 threads/requests will be hitting the server every second. Please correct me if I am wrong.
b) As per the above parameters, there will be a total of 30 * 100 threads/requests. Does this mean all the 3000 threads/requests will be sent within 30 seconds [ Ramp Up period ]
Assuming you have 30 users and 30 seconds ramp-up
JMeter will start each virtual user each second
Each virtual user will start executing samplers upside down (or according to the logic controllers, if any) as fast as it can (if you don't use timers) so the delivered load can be either more or less than 30 requests/second, it depends on how fast JMeter is executing requests and on your application response time as JMeter will wait for response from previous sampler before starting new one
When virtual user finishes executing all the samplers defined in test plan it will start over and do point 2 for 99 more iterations
When virtual user won't have more samplers to execute and loops to iterate it will shut down
A couple of tips:
You can use Server Hits Per Second listener to see how many requests per second you are actually making given your test plan configuration
You can control the number of requests per second via Constant Throughput Timer
Consider upgrading to JMeter 3.2 as newer JMeter versions normally contain new features, performance improvements and bug fixes
according to jmeter manual ramp up is:
How long JMeter should take to get all the threads started.
If there are 10 threads and a ramp-up time of 100 seconds, then each
thread will begin 10 seconds after the previous thread started, for a
total time of 100 seconds to get the test fully up to speed.
So if your goal is to reach 3000 request within 30 seconds the above wont do, it might take more than that depending on how much it takes to finish the requests you are sending.
If you are looking for Throughput you can add an aggregate report listener which calculates the throughput for you and depending on the results you can configure your thread properties to reach your goal.
Reference :
Jmeter user manual

How to use multiple scenarios in jmeter

I have to test ramping up 1 user every minute for 10 minutes and then then ramping up 20 users ever minutes for next 10 minutes with jmeter. I tried to search on internet, seems like I need to use ultimate thread? If so can someone please give me an example of above scenario?
You can use multiple regular thread groups and in Test Plan,you can select Run thread Group consecutively.
Ultimate Thread plugin allows fine grained control of user threads. It will certainly achieve the concurrency pattern you're looking for. You can also start a thread group delayed with just out-of-the-box Jmeter though:
Use 2 thread groups, and set the required ramp up rates for each thread group. Since you need the second thread group to kick in 10 minutes after the test starts, add a startup delay of 600 seconds.
The relevant jmeter documentation is in Section 4.1 here:
Version 1.9 introduces a test run scheduler. Click the checkbox at the bottom of the Thread Group panel to reveal extra fields in which you can enter the start and end times of the run. When the test is started, JMeter will wait if necessary until the start-time has been reached. At the end of each cycle, JMeter checks if the end-time has been reached, and if so, the run is stopped, otherwise the test is allowed to continue until the iteration limit is reached.
Alternatively, one can use the relative delay and duration fields. Note that delay overrides start-time, and duration over-rides end-time.
It is possible to do with 1 ultimate thread group.
Your setup should be as given below. You did not mention the test duration. I assumed it as 3600 seconds.
1st Row : We will have 10 threads in 600 seconds by starting a thread every min.
2nd Row: We will have additional 200 threads (ignoring the first 10 threads), in the next 600 seconds by starting 20 threads every 1 min.
We need a wait for 600 seconds in the second row which is update in Initial Delay field for the first row to complete.

Jmeter report interpreting from loadosophia, Regarding Max virtual users in summary report

I've recently started working in Jmeter and I have run a test with 40 virtual users. I've also used loadosophia plugin that uploads results to loadosophia. But I've few doubts about numbers I've got in the summary report in loadosophia.
I've run with 40 virtual users with 3 seconds as ramp up period but in loadosophia report it shows Max virtual users=17 and Average virtual users = 6.5 but Transaction count is 40 which actually should be virtual users. Does this indicate there were maximum of 17 virtual users were concurrent ?
Test run duration it shows 3 seconds, but I can see Maximum response time is 5078 milliseconds which is(5.7 seconds) how can it be test can be completed in 3 seconds while it shows some requests took more than 5 seconds to send response? (I am assuming it is not considering ramp up period which I gave 3 seconds, Am I right?)
Thanks in advance.
Currently your scenario looks as:
Start with 1 user (which will immediately start test actions)
Each second add 13 users (each of them will start test actions as soon as the thread is started)
When thread finished it's job it exits.
So there is no way to say exactly what will be the load at the "peak" where all threads which are active at the moment are hitting the application under test.
Not too sure regarding loadosophia, but if you expect 40 concurrent virtual users the only way to reach this load is providing enough loops and adding a Constant Throughput Timer to orchestrate the load and limit (or ramp-up) it to the value, you set in timer.
Another option is using a Synchronizing Timer which allows to "release" threads when specified amount is reached.

Resources