Performance testing- Distributing user load across test scenarios in JMeter - jmeter

How can I distribute user load across test scenarios in JMeter? For instance, if I am testing an email system for 400 concurrent users, I would like to apportion the total peak user load as follows:
100 concurrent users checking emails
100 concurrent users replying to emails
100 concurrent users composing new emails
50 concurrent users sending emails with attachments
25 concurrent users making changes to their settings
25 concurrent users doing folder operations
I tried to create one thread group per scenario. But, when I add a scenario to one of the thread groups, other thread groups vanish. It looks like I can't have multiple thread groups and add one scenario per thread group.

There are different approaches for implementing the scenario:
Using different Thread Groups for different groups of users
Using single Thread Group and distribute the load using one of the following:
Throughput Controller
Switch Controller
See Running JMeter Samplers with Defined Percentage Probability article for more information on each of the tecnhiques.

I would suggest you to go with Throughput Controller - this site has the clear explanation you have been looking for - http://www.testautomationguru.com/jmeter-user-load-distribution-using-throughput-controller/.

Related

How to get input/request data for higher load test execution

I have a login scenario to be tested for 10000 users, which contains phone# as input and have given in csv file. Im able to perform load testing for 10000 users and able to show the report with total samples, throughput etc post exporting to a file. However issue is customer wants proof that we are giving input as 10000 users and not using loop eg(500 threads * 2 loops). Kindly help with suggestions if we have any option to show that we are using 10000 unique users.
There is a listener called Active Threads Over Time (can be installed using JMeter Plugins Manager) which shows how many users were active during this or that phase of the test
jmeter.log file contains information how many threads were started for this or that Thread Group
.jtl results file contains number of active threads, both overall and in the current Thread Group
HTML Reporting Dashboard contains the Threads Over Time chart

How can we divide different actions to be done by different loads in a thread group of a Jmeter

I have a requirement of load testing with 100 users, and a ramp-up period of 500.so that in every 5 sec, 1 user will login.i have some actions to be done in the application.lets say there are 50 scenarios. so out of 100 users, each of 2 should do one scenario.
how can i set 2 users should do one scenario out of 50 scenarios in a thread group.
Can anyone help me..Thanks in advance..
First, JMeter does not have the concept of users, but VUsers which are Java threads instantiated by a TG. If the 50 scenarios are unique and need to be executed simultaneously, the suggestion is to create 50 distinct TG with 2 Vusers each.

How to calculate concurrent users in Jmeter

I have created a test script with the below scenarios and having thread group count as 100 and ran it for 10 minutes.
Employee Creation took 1 minute during the test script design
Update Employee took 2 minutes during the test script design
In the above mentioned scenario how many concurrent users will be on the system for 10 minutes?
I don't think there is a formula to predict or calculate concurrency as we don't know the number of samplers, response time, etc. so go for one of the following options:
Generate HTML Reporting Dashboard and look into Active Threads Over Time chart - it will show you the actual concurrency.
If you don't want or can not generate the dashboard you can achieve the same using Active Threads Over Time Listener which can be installed using JMeter Plugins Manager as a part of 3 Basic Graphs bundle.

Should I make identical thread groups in JMeter to simulate simultaneous user activity?

When doing load testing in JMeter, should I make multiple identical thread groups to simulate multiple users simultaneously performing actions on my site? Or does one thread group with multiple threads/users in it suffice?
Thread Groups is designed to represent a "group" of virtual users which is "grouped" by some factor.
As per Thread Group documentation:
A Thread Group defines a pool of users that will execute a particular test case against your server.
So the answer is one thread group with multiple threads/users in it suffice
For example if you are load testing StackOverflow you will have following example groups of users:
Not authenticated users searching for answers
Authenticated users providing answers
Authenticated users asking questions
Authenticated users writing comments
New users who are signing up
Assuming above setup you will need 5 Thread Groups to represent these 5 different groups of virtual users.
Distribution of users in the same thread group is also possible via Throughput Controller or Switch Controller, see Running JMeter Samplers with Defined Percentage Probability guide for more information
we can increase number of thread/users for simulation hence there is no need to add identical threads

how can we perform load test for 50 users simultaneously using jmeter

out of 50 users 10 users should perform one activity and 5 users should perform another and soon. I distributed the users for different activities.
the scenarios as follows:
Activity
Full text search 10 users
Key word Search 3 users
wild card search 3 users
logical operator search 4 users
Enable 5 users
Disable 5 users
View Config 5 users
View Log history 5 users
View Graph 5 users
View Alerts 5 users
Total users 50 users
can any please help me for this
Thanks in advace
You could use CSV Data Set Config. For each thread, one line from a csv file is read and stored in jmeter variables. The threads then can branch depending on the values.
Take a look into the following Test Elements:
Throughput Controller - to distribute requests between keyword search, wildcard search, etc.
Constant Throughput Timer - to set exact load of 50 requests per second (you'll need to put "3000" in "Target throughput" input field.
I'd create a ThreadGroup for every type of activity required by the test. If you need custom input data, you can use CSV data to configured outside jmeter for each test.
This way you have all the operations under the same script and just play to execute them.

Resources