Anant patil
Anant patil

Reputation: 161

How to do parameterization for file name text of csv data set config in jmeter

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.

Upvotes: 3

Views: 3488

Answers (1)

Dmitri T
Dmitri T

Reputation: 168002

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

Upvotes: 5

Related Questions