1

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

Nahor
  • 83
  • 1
  • 7

1 Answers1

1

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.

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • I tried by going one more level up (../../../../src/test/resources/testData) and executed the script, Still it shows the same error. below is the screen shot for the same: [After going one level up in file hierarchy][1] [1]: https://i.stack.imgur.com/O3H11.png – Nahor Jan 08 '20 at 13:17
  • then the file is not there – Dmitri T Jan 08 '20 at 13:20
  • I even tried by manually creating the file in the path but it shows error. Correct me if I am wrong, after executing the script, file should be created automatically in the path which we have set in the variable. Right? – Nahor Jan 08 '20 at 15:43