dust
dust

Reputation: 512

JMeter data source CSV Data Set Config from command line

I have a JMeter setup which reads data from a CSV file configured in CSV Data Set Config element. It works fine, the CSV file is specified in CSV Data Set Config -> Filename.

Now I want to envoke JMeter from command line instead of GUI, and I want to specify a different filename for the above element. How to go about it?

I tried "-JCSVNAME=" but it does not seem to work.

Ideas?

Upvotes: 2

Views: 4115

Answers (2)

Dominator_007
Dominator_007

Reputation: 3

Just change the Filename field in CSV Data Set Config to ${__P(datadir)}.

Include the following option while using jmeter.

-Jdatadir=path_to_the_config_csv

Example: jmeter -Jdatadir=/home/InputData.csv -n -t /home/request.jmx -l some.csv

CSV Data Set Config

Upvotes: 0

UBIK LOAD PACK
UBIK LOAD PACK

Reputation: 34566

Just use __P function in the Filename field of Listener

CSV Filename as property

Then on command line , add this:

-Jdatadir=full path to folder that contains CSV

Upvotes: 0

Related Questions