1
votes

I am trying to pass a parameterized variable name which I have defined in "User Defined Variables" config element. When I try to access the variable value by ${variable_name} in the Filename field of Flexible File Writter plugin I am getting an exception.

One thing I would like to menion here, I am using the filepath based on the Maven architecture..

Below is the image of User Defined Variable config element in which I have created the variable named 'testDataFilesPath' having the path where I want to save the file.

User Defined Variables Element where variable is created

Below is the image of exception which I am getting after executing the jmeter script:

Exception after running the Jmeter script

1
Is your jmx file in the same folder path as mentioned in your User defined variable ?TeJas

1 Answers

1
votes

When you execute test via JMeter Maven plugin the base folder looks like:

\target\some GUID\jmeter

therefore if your file lives under src\test\resources\testData you need to go one more level up, to wit:

../../../../src/test/resources/testData

Check out How to Use the JMeter Maven Plugin to learn more about the specifics of running JMeter tests via Apache Maven build toolchain.