Jmeters Variables From CSV File - relative path
Jmeters Variables From CSV File config element set its base directory as a user’s home directory. If you Browse for your file it will put something like:
/Users/your_user/./your_file.txt
So in such case we need to pass base directory to be able to work with relative paths for our files.
- Define base directory ‘baseDir’ in User Defined Variables:
${__BeanShell(import org.apache.jmeter.services.FileServer; FileServer.getFileServer().getBaseDir())}
-
Use it in your element:
${baseDir}/../data/your_data.csv