Home > Enterprise >  JMeter - CSV Config with same variables
JMeter - CSV Config with same variables

Time:10-19

I have 8 transaction (crud1, crud2) using 8 Transaction Controllers. I want each Thread (user) to perform all the 8 txns. Txn 1-4 are different from txn 5-8. The data for txn 1-4 are also different from txn 5-8. However, they have similar fields like name, address, etc.

All txns will run within a Thread Group.

Thread Gp
|- txn1
   |- http req1
   |- http req2
   |- http req....
|- txn2
   |- http req1
   |- http req2
   |- http req....
|  .....
|- txn8
   |- http req1
   |- http req2
   |- http req....

I read from https://www.perfmatrix.com/jmeter-config-element/ and it seems like I can only have CSV config in Test Plan and Thread Group. I've wanted to test duplicate names for different Transaction Controller and Samplers, however, I got inconsistent results.

  1. Are CSV Config supported at the Controller and Sampler level ?

  2. How do I handle the duplicate field names ? I use unique field names for the different txns in the same CSV row for each Thread loop ? Any other way ?

  3. In terms of CSV Config scoping, how does JMeter handle duplicate field names at Test Plan, Thread Group, Controller, Sampler ?

Thanks

Edit:

"duplicate field names": As I have 8 Transaction in each thread looping, there are some transaction using the same field name, eg Txn 1 has an "Address" field and Txn 2 also has an "Address" field but they have different values. Since the CSV file is read per looping, I can only have 1 field called "Address". Does it mean that I have to called it Address1 and Address2 ? Is there feature in JMeter to handle this situation ?

CodePudding user response:

You can have CSV Data Set Config wherever you want: https://imgur.com/a/xQpYpg8, CSV Data Set Config obeys JMeter Scoping Rules.

I don't know what do you mean by "duplicate field names", by default JMeter reads next line from the CSV file on each iteration. If this is not something you're looking for - take a look at Sharing Mode setting.

  • Related