Create Jmeter Aggregate report with the thread group name - jmeter

I need to create an Aggregate report under a thread group with the thread group name. For Ex: If my thread group name is LoginThreadgroup I need to create an Aggregate report file, View Result Tree file name with LoginThreadgroup.jtl LoginThreadgroup_VRT.jtl
I tried to use -${__BeanShell(ctx.getThreadGroup().getName())}.jtl
and
${__threadGroupName}_ViewResultsTree_Failure_report.jtl
ETC but both dint work out well in my case.
I have many thread groups under test tree, for each, I would like to create jtl files with the respective thread group name.
Can anyone help me in this

I don't think you can use JMeter Functions and/or Variables in "Filename" field of a Listener
In general using Listeners is not the best idea as they don't add any value and simply consume CPU, RAM and Disk resources.
I would rather suggest
Adding __threadGroupName() function as a prefix/postfix to your Samplers labels
If you want separate results for different Thread Groups you can use Filter Results Tool to extract Thread-Group-specific entries from the .jtl results file
Aggregate Report can be generated using JMeterPluginsCMD Command Line Tool

Related

Can I use the same CSV file for multiples Thread groups?

could find a precise answer to my question.
I have multiple Threads groups on my Test Plan, in all of them I created a CSV file to read a list of cars, for example:
Thread group 1 cars_thread_1.csv
Thread group 2 cars_thread_2.csv
Thread group 3 cars_thread_3.csv
But the list of cars didn't change inside the CSV files.
What's the recommended approach? Keep it like that or I can create a single CSV cars.csv and all of the threads read it?
Sure you can, just place it at the same level as Thread Groups so all of them would be in the CSV Data Set Config's scope
By default each thread will read next line from the file on each iteration, if this behaviour is not something you're looking for - you can amend Sharing Mode setting of the CSV Data Set Config.

Jmeter How to use different user variables for each thread (each thread. not thread group)

I want to use 100 concurrent users in one thread group in Jmeter. but I want to each thread to use different user login password. how to achieve that?
full credit to Apache Jmeter documentation:
Some test plans need to use different values for different users/threads. For example, you might want to test a sequence that requires a unique login for each user. This is easy to achieve with the facilities provided by JMeter.
For example:
Create a text file containing the user names and passwords, separated by commas. Put this in the same directory as your test plan.
Add a CSV DataSet configuration element to the test plan. Name the variables USER and PASS.
Replace the login name with ${USER} and the password with ${PASS} on the appropriate samplers
The CSV Data Set element will read a new line for each thread.
UPDATE documentation link
https://jmeter.apache.org/usermanual/best-practices.html
There are multiple options depending on where do you want to keep the credentials.
The most commonly used approach is storing login/password combinations in the CSV file and using CSV Data Set Config for reading them. By default each JMeter thread will read the next line from the file on each iteration
If your credentials are in the database you can use JDBC PreProcessor
If you plan to run your test in Distributed Mode and don't want to worry about copying test data to all slave machines - there are HTTP Simple Table Server and Redis Data Set Config
More information: JMeter Parameterization - The Complete Guide

JMeter/Blazemeter capabilities

I am a Load Runner tester and would like to know how below requirements can be done in Jmeter.
Data parameterization - How can we implement unique and random data parameterization in Jmeter.
how do we get vuser id value for each virtual users in a Thread group?
If we need to initialize/load any data during vuser initialization (vuser_init() in load Runner) , how can we do it? Also, how do we call any function when vuser is ending, like vusr_end() in LoadRunner.
In Core JMeter:
For Data parameterization, use CSV DataSet , it will pick columns from CSV file and expose them as JMeter Variables you can use with ${varName}
To get user id, use jmeter function __threadNum()
There is no strict equivalent, for vuser_init you can use a Once Only Controller. For vuser_end, there is no equivalent
For parameterization:
CSV Data Set Config - for sequential data
Random CSV Data Set Config - for random data
HTTP Simple Table Server - for unique and random data, suitable for Distributed Testing (basically equivalent of the Virtual Table Server)
__threadNum()
Normally it is being done in:
vuser_init() - setUp Thread Group
vuser_end() - tearDown Thread Group

Use JMeter to simulate multiple simultaneous requests

Hi I am new to JMeter.
Is it possible that I can input a CSV file (with 25 rows of unique customerID number) and use many HTTP (GET) URL request simultaneously for every row in the csv file?
Thank you for your response in advance.
Assuming that you have one thread group, with n threads, what you describe is the default behavior of CSV data set when you set the sharing mode to All threads. Every thread, will pickup the customer id from next line of the file.
Please see following link for details.
http://jmeter.apache.org/usermanual/component_reference.html#CSV_Data_Set_Config

How to set up a large amount of request data for a jMeter load test

I want to simulate a few hundred http request each with a different token and userId which I have in a database table.
What's the best way of setting up a jMeter load test to do this?
You can use JDBC Sampler to extract you data from DB to create a CSV and a JSR223 Sampler using groovy (add groovy-all.jar in jmeter/lib folder) to write the extracted values to a CSV file.
Then in the real plan , use CSV DataSet Config using the generated file.
Depending on how you want to use the dataset, you will play with Sharing mode attribute.
If you want to do both steps within the same plan you can use a Setup thread Group that will contain the JDBC Sampler part to write the CSV File, this will use 1 thread and then
the other part in regular Thread Group that will use the number of users you need.
One way is to put all your parameters into a csv file and use CSV Data Set Config in jmeter. Right click on the thread you have created - add- Config Element- CSV Data Set Config. Remember you need to set the Number of Threads(users) to match the number of users in your CSV file.

Resources