Simultaneous users for web load tests in JMeter? - performance

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.

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 to create Burst test in Jmeter without using parallel threads?

I have a requirement to create simple Burst test in Jmeter:
10 requests-> 20 requests -> 30 requests
On single worker mode.
Throughput 20ms
Anticipated response time : <=200ms
How can we achieve this with Jmeter without using parallel threads?
I am looking for a simple solution.
Thanks a lot
Add plugin
Ultimate Thread Group to JMeter
Add Ultimate Thread Group component with settings of 3 rows
Set Start Threads Count 10,20 and 30
Use different start times so requests batch will be executed in different times
"Ultimate" means there will be no need in further Thread Group plugins. The features that everyone needed in JMeter and they finally available:
infinite number of schedule record
separate ramp-up time, shutdown time, flight time for each schedule record
and, of course, trustworthy load preview graph
Consider using Throughput Shaping Timer and Concurrency Thread Group combination which provides flexible way of defining load patterns:
They can be connected together using Feedback Function so JMeter will be able to kick off more threads in order to reach the desired throughput (number of requests per second) if current amount is not enough.
Both can be installed using JMeter Plugins Manager:

Jmeter - Variation in count of different http requests within same thread group

Requirement: Load for a total of 100 users within an hour. Each user hits 3 different services different number of times at the same time.
for example: user 1 is going to hit service1- 3 times, service2- 5 times and service3 - 4 times at the same time. Same will be repeated for 100 users over 1 hour.
I have a thread with users-100, rampup time -60 (min). and then I am using parallel plugin and within that plugin created those 3 different sample requests. But I don't know how to configure the number of times, each of those service will be called per user at the same time.
Your test scenario doesn't make sense, normally 1 thread (virtual user) can hit only one endpoint at a time. The use when user executes 3 same requests to the same endpoint looks very suspicious as well. So I would recommend reconsidering your scenario and implement distribution using one of the following approaches:
Use different Thread Groups for different requests
Use Throughput Controller
Use Switch Controller
Use Weighted Switch Controller
If however I'm wrong and you're trying to implement some form of AJAX testing when requests are being triggered at the same time and in parallel - example test plan would be something like:

How to run one sample multiple times independent of the number of threads in Thread group in jmeter

i have the need to run one http request sample more times than the rest of the samples in the Test group, for example, i need to run for 10 users, but for each of them, i need to run one of the samples multiple times, lets say 10, is there a way to achieve it?
1) I set "Number of Threads (Users)" in Thread group to 10, so i have 10 total users (with data taken for every thread from a CVS file, with equal number of rows and threads, so 1 thread is an unique data set.
2) I make some requests after, but for only one of the requests, i need to make it like 100 times in parallel for the same data for every thread, so in total, i will make 1000 (100 http requests for 10 unique users/threads) requests to that endpoint
Thanks in advance!
Edit: I found the loop controller, but its not making the 100 http requests at the same time for each thread in the thread group, it makes another one when the first ends
If I correctly got your requirements, to wit:
You need to execute one sampler more times than other samplers
The execution must occur at exactly the same moment
The most obvious choice would be either Parallel Sampler or Parallel Controller (depending on the nature of your requests). You can install both test elements using JMeter Plugins Manager:

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