I have test plan like this:
Thread group
|---User parameter(user'scredentials mention there)
|--Request body (same for the users)
|----csv file1
|-----csv file2
Now if it is users.name==joe
, this should execute csvfile1
if it is user.name==nmeon
, execute csvfile2
through user parameter I got user name in the JMeter console.
How to write the script using IF controller/ bean shell If I use what would the script written for this?
You basically have 2 options:
Change your file names to be nmeon.csv
and joe.csv
and use ${user.name}
in the CSV Data Set Config "Filename" section
Use 2 If Controllers like:
${user.name} == "joe"
${user.name} == "nmeon"