1

I am not getting data from CSV files. I create 2 different HTTP requests and made 2 different CSV files and now from 1 CSV I want to get data for 1 HTTP request and from 2 CSV file I want to get data for 2 HTTP request but currently from 1 CSV file both HTTP requests get data. Can any one help me how to post data from both CSV files?

Thank you in advance

abhi shah
  • 21
  • 2

2 Answers2

0

Just use different names for variables coming from CSV file 1 used for HTTP Request 1 vs ones coming from CSV file 2 for the 2 other HTTP requests.

First CSV Data Set:

CSV 1

Second CSV Data Set:

CSV 2

Except for that, there is nothing special and it should work.

UBIK LOAD PACK
  • 33,980
  • 5
  • 71
  • 116
  • Thank you for sharing your feedback but I want to know that, In both csv files I have different parameter, I have 2 different users to log in Like one user parameters are for Passenger and other user parameters are for Driver. Now when I run my script that time, passenger script run successfully and get data from passenger CSV file but second driver http request is run successfully but all parameters are getting from passenger script instead of driver CSV file. – abhi shah Sep 20 '20 at 05:16
0

If your 2 CSV files are independent just use different variable names for 2 requests and that should be it.

If your 2 CSV files depend on each other, i.e. you want to extract specific value from CSV file 2 based on the value from CSV fiel 1 - you won't be able to use CSV Data Set Config, you will need to switch to __CSVRead() function, see How to Pick Different CSV Files at JMeter Runtime for more details

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • Thank you for sharing your feedback but I want to know that, In both csv files I have different parameter, I have 2 different users to log in Like one user parameters are for Passenger and other user parameters are for Driver. – abhi shah Sep 20 '20 at 05:12
  • Now when I run my script that time, passenger script run successfully and get data from passenger CSV file but second driver http request is run successfully but all parameters are getting from passenger script instead of driver CSV file. – abhi shah Sep 20 '20 at 05:15