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

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"

Related

How to run many users calls from one Thread Group at the exactly the same time in Jmeter

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

How can I put 2 scenario's with more then 1 flow in jmeter?

Customer has 2 scenario's. Both have more then 1 flow.
For example.
Tickets
a. Buy Tickets: 1500 concurrent users
b. Browse the website: 1500 concurrent users
View
a. Flow 1: 750 concurrent users
b. Flow 2: 750 concurrent users
c. Search the website: 500 concurrent users
Scenario 1 must be run before scenario 2 can be run.
Now is my question: how can I put this in Jmeter?
Normally you should use different Thread Groups to represent different groups of business users. If you need one Thread Group to be executed before the other(s) either go for setUp Thread Group or tick Run Thread Groups consecutively on Test Plan level, this way Thread Groups will be executed upside down
If you need yet another level of distribution inside the Thread Group you can use Throughput Controller which controls how often its children will be executed. So if you put 3 flows under 2nd Thread Group you can use:
2000 threads (virtual users) in total
Throughput Controller 1 - 37.5% of threads will be executing flow b
Throughput Controller 2 - 37.5% of threads will be executing flow c
Throughput Controller 3 - 25% of threads will be searching website
Example test plan outline:
More information: Running JMeter Samplers with Defined Percentage Probability
It's important to note that, although the mentioned techniques will work in terms of configuring the number of VUsers, they will not guarantee that the Avg TPS per requests will match the same proportion. I've mentioned this in another post:
"It's common a misconception when trying to achieve a targeted percentage of requests to instantiate Vusers in the same proportion. This only works if the Avg Response Time (ART) of each type of request is the same. It's very unlikely that, for example, the search request ART will the same RT as the registration request. As a consequence, after executing the test for a certain amount of time the actual proportion of requests (of each type) will be the different than the targeted request proportion."

How to uniformly distribute JMeter threads throughtout the entire run of the test

I have the following
but when I run this with 60 threads I don't see the threads being fired off every second. Instead it seems like the requests in the transaction controller are fired off at a rate of 60 requests per min.
Is there a way I can have JMeter create threads at the rate of 60 per minute without a limit on requests?
You need to use Rampup duration in that case. Again that is one time activity, once threads are created they will execute the request and will die / repeat if you need.
Ultimate Threadgroup plugin is also helpful here.
Generally everybody is interested how much throughput(req per unit time) can server take. So in your case its doing correct job i.e. sending requests 60 per sec.
In practice creating multiple threads per sec is bad practice and IMO such testing is not useful (Why it is required?) because client threads in JMeter is not important but requests sent to server by threads (can be 1-10 or 100) many times and how server responds is important.
If your use case is different then share it in detail and we'll discuss. Hope this helps.
If you want JMeter to kick off one thread per second you need to specify Ramp-Up Period equal to the number of threads (virtual users) under Thread Group, if you want 60 virtual users - go for 60 seconds ramp-up.
Also make sure you allow your Thread Group to loop forever as if you don't - you will run into a situation when some threads have already done their job and some haven't been started yet.
Example configuration:
Example output:
More information: JMeter Ramp-Up - The Ultimate Guide

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.

Simultaneous users for web load tests in JMeter?

I have made some PHP scripts and I want to test the response time for simultaneous users in JMeter. This scripts are run in a very short time (50 miliseconds).
What I would like to do is to simulate a load test from 1 to 50 of users where each user (thread) repeats the request for an unlimited period. So first we will have 1 user, after 2 simultaneous users, after 3 ... and so on.
I am trying to do it but with I have is response times where it is evident that there is no simultaneous request.
With HP loaddrunner we can define number of iterations for each thread, is this possible in JMeter?
You can possibly use these 2 thread group implementations
Stepping Thread Group
Ultimate Thread Group
from Jmeter Plugins package, that let you set load-increase for you scenario as you want.
As well you can also look onto Synchronizing Timer if you want "better" concurrency - but this is rather stress-testcase than load one.

Resources