3
votes

I am passing the value for file name text filed in csv data set config as ${filename}, this variable contains entire path and fetching it form one more csv data set config which is present immediate to the thread group and the variable which I am passing to csv data set config that is inside the if controller here I couldn't able to pass that value to file name text filed, getting problem.

1
Do you mean to say that, you have a CSV file which contains the file path & file names of one or more CSV files which you are passing into another CSV Data set Config using ${filename}. please clarify?Zubair M Hamdani
Yes,i have multiple file names and its path in the csv file,i am reading those file names by using csv data set config using variable name as 'filename' and in the if controller i have one more csv data set config to read the content of each file here dat variable reffering as ${filename} for file name text field of csv data set config but the variable is not replacing with value.Anant patil

1 Answers

5
votes

CSV Data Set Config cannot use JMeter Variable as the "Filename". However it is possible to use __property function there.

So your test plan should look as follows:

  1. Read some value into a JMeter Variable i.e. foo via 1st CSV Data Set Config
  2. Convert foo variable into foo property via __setProperty function
  3. Use ${__property(foo,,)} as a "Filename" in 2nd CSV Data Set Config.

For more information on different JMeter's functions see How to Use JMeter Functions post series