Reputation: 35
I am using multiple csv files in one thread for comparision purpose.
Here first CSV Data set Config returns the file names
1.csv
5.csv
1000.csv
now I want to pass above file name to second CSV Data set Config
C:\\Softwares\\Installed\\jmeter-3.0\\bin\\TestData\\files\\${filename}
Is it possible in jmeter? can any one help me to resolve the problem.
Thanks, Vijay
Upvotes: 3
Views: 7952
Reputation: 168002
CSV Data Set Config is getting initialized before any JMeter Variable therefore your ${filename}
will never be resolved and you will be getting "File not found" errors.
The options are in:
Switch to JMeter Properties instead of JMeter Variables.
${filename}
to ${__P(filename)}
(see __P() function documentation for syntax)Define filename
property. It can be done in 2 ways:
Via user.properties file. Add the next line to the file:
filename=C:\\Softwares\\Installed\\jmeter-3.0\\bin\\TestData\\files\\1.csv
JMeter restart will be required to pick up the property
Via -J
command-line argument:
jmeter -Jfilename=C:\Softwares\Installed\jmeter-3.0\bin\TestData\files\1.csv
See Apache JMeter Properties Customization Guide for more information on JMeter properties and ways of setting, getting and overriding them
Upvotes: 13