How to collaborate Jmeter Load Test Scenario - jmeter

Scenario - System should able to handle 1000 simultaneous users logged-in, and 500 users also active at the same time in the system.

Normally you should use different Thread Groups for representing different groups of business users so just add 2 Thread Groups, one with 1000 "logged-in" users and another one with 500 users which are "active" (whatever it means).
Then add HTTP Request samplers to implement your users activities (you can even record and replay the test scenarios using HTTP(S) Test Script Recorder)
If you already have implemented these user flows and just want to divide 1500 users into 1000 and 500 doing different actions within the bounds of the singe Thread Group- put them under 2 Throughput Controllers
More information: Running JMeter Samplers with Defined Percentage Probability

Related

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."

JMeter test plan for 100 users making 20 different http requests simultaneously

What I have tried so far
Creating 100 Thread Groups which has 20 different HTTP Request listeners each,
so total 100*20 => 2000 unique different http requests..
Each Thread Group configured with
Number of Threads = 1
Ramp-up Period = 0
For Test Plan Unchecked Run Thread Groups Consecutively
Problem: Total 2000 requests are making in span of 10 - 20 seconds, but I want to make the all requests
simultaneously, or at least in span of 1-2 seconds is ok
Put your HTTP Request samplers under a single Thread Group, you don't need to have different Thread Groups with 1 user (or at least going forward consider using Module Controller to avoid code duplication)
Add Synchronizing Timer at the same level with HTTP Request samplers and set Number of Simulated Users to Group by to 20
Threads are supposed to bring you concurrency, not ThreadGroups. Those are meant to model different user behaviours.
Please try 1 ThreadGroup with 100 Threads.
Depending on what exactly your use case is, you could then put all the listeners into one Random Controller inside the ThreadGroup. Our you could use any other controllers that suit your needs.

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 randomize website test using jmeter?

I want to test multiple scenarios in a same website using JMeter.
For example I have 2 thread users.
I want..
>1st user performing 1st scenario: like login his account
>2nd user performing 2nd scenario: browse some other page
How this can be achieved in JMeter?
If you need 50% of users to perform login and 50% of users to browse the website there are following options available:
Use 2 separate Thread Groups:
Thread Group 1: with virtual users who perform login
Thread Group 2: with virtual users who perform browsing
Use Throughput Controller like:
Add Throughput Controller configured like:
Percent Executions
50.0
Add the relevant sampler(s) under the Throughput Controller (as child)
Do the same for 2nd, etc. scenarios
See Running JMeter Samplers with Defined Percentage Probability article for more detailed explanation of above and more complex distribution scenarios.

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