Smaug
Smaug

Reputation: 21

jMeter maven plugin with csv input files

I've got a working simple jmeter jmx with the plugin, reading the docs I've found how to override .properties files but right now my problem is that I have a folder with .csv files input data that I want to use in my test. The folder with the csv files is specified in an user.properties file as inputDataFolder=path/to/folder and referenced in the jmx like ${inputDataFolder}file.csv. It works really fine without maven but when I run it with the verify goal it doesn't works and throws:

Error in NonGUIDriver org.apache.jorphan.util.JMeterStopTestException: ModuleController:Register Fixed Customer has no selected Controller (did you rename some element in the path to target controller?), test was shutdown as a consequence

The error suggests me a mistake defining the path to the csv folder, but I don't know how to do it correctly with the plugin. Any help is really appreciated.

PS: This is the structure that I have under src/test/jmeter

jmeter/
├── foldercsv/
├── test.jmx
├── user.properties

Upvotes: 1

Views: 1566

Answers (2)

Abhi
Abhi

Reputation: 53

I have maven project and configuration as:

src/test/jmeter/myFile.jmx
src/test/resources/testDataFiles/csv1.csv, csv2.csv etc

to specify csv file path in CSV Data Set Config I had to use

../../../src/test/resources/testDataFiles/csv1.csv

I tried

../resources/testDataFiles/csv1.csv -- didn't work ../../resources/testDataFiles/csv1.csv -- didn't work ../../test/resources/testDataFiles/csv1.csv -- didn't work

The path worked for me is:

../../../src/test/resources/testDataFiles/csv1.csv

Note: When I run jmeter script in JMeter UI it works fine with csv file path: ../resources/testDataFiles/csv1.csv but surprisingly this didn't work while executing the same script with Maven command.

Upvotes: 0

Smaug
Smaug

Reputation: 21

I got myself the answer. I digged into many post and I found that indeed it was a path issue, got it right reading this:

Thanks!.

Upvotes: 1

Related Questions