Jmeter: How to map specific variable values from CSV file to specific thread-groups in a test plan

Surya T

I have a test plan with 12 thread-groups, each one is one test scenario.I want to use unique login credentials for each thread-group. So I've created a CSV file, added CSV Data Config element to each thread-group and selected "All Threads" in "Sharing mode". Whenever I execute the test plan(All thread-groups concurrently) the thread-groups are not taking variable rows sequentially. I expected that the 1st thread-group in the test plan would consider 1st row of variables in the CSV file based on the post: JMeter test plan with different parameter for each thread But it is not happening and I am unable to understand the pattern of variable allocation. Please help me resolve my issue.

My CSV file looks like below: userName,password,message userone,sample123,message1 usertwo,sample123,message2 . . so on...

Refer below for configuration of CSV Data Config element: enter image description here

Thanks!

Kiril S.

Threads and thread groups are different things. When you choose "All Threads" in "Sharing mode", it just means that all threads in the same thread group will share CSV. Thread groups are always independent.

You have 2 simple options:

  1. Use one thread group and control what users are doing with controllers. For example Throughput Controller can allow you to control how many threads perform this or other script scenario within the same thread group.

  2. Split your CSV so, that each thread group has its own CSV.

And many more complicated options, for example:

  1. Use __CSVRead or __StringFromFile function, which allows to read one line. That way you can assign each thread group a range of lines to read, rather than reading the entire file.

  2. If your usernames and passwords are predictable (e.g. user1, user2, etc), you could use a counter and a range for each thread group.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to get specific map values from inside Freemarker template

Jmeter: How can i disable specific thread group from command line

How to add specific values from array list to the Hash map?

How to restrict user defined variable value to specific thread group in jmeter

How to get specific data from a CSV file

How to store a specific element from a csv into a variable?

How to change all values in a column of a csv file to a specific value php

Scala How to Find All Unique Values from a Specific Column in a CSV?

How to print only the specific parts of values from the json map?

How to run a specific test plan

How to run Specific Thread of Jmeter from command line

Executing Specific JMeter Thread Groups in a Test Plan

How to store specific values from a data frame to a variable in R?

How to extract specific values from a file and print them into another file

Delete all rows with specific values from csv file

jmeter - how to skip specific row from csv

How to import specific values from a data frame into a variable in pandas

How to count frequency of specific positive/negative words from a list in a .csv file with text and date values? in R

How to remove specific phrase from csv file

How to read in values from specific columns in a CSV file to perform calculations - C++

How do I get specific values from a collection map

Filter specific Values from a csv file

how to filter json file with specific tag values and get output into csv

7000+ Records in CSV file for 100 Threads in JMeter Test Plan

R Test if Specific Groups of Values are in ID Group

How to map different JSON objects from the fixture into specific spec test file in the cypress

How to put specific parameters as independent variables into csv-file in JMeter?

Retreive specific values from file

How to extract specific values from imported csv and write it?