Deepak N
Deepak N

Reputation: 1639

How can I pass more than 10 command line parameter to jmeter command line run?

I need to pass more than 10 parameters in jmeter command line run. But if I go more than 10 the jmeter command line gives error. As I am using distributed mode I cannot use properties file to give parameter. Can some body suggest me a better way.

Upvotes: 1

Views: 1593

Answers (2)

Prasad Lele
Prasad Lele

Reputation: 354

if you are not running in distributed mode u can't use -G option in this case

  1. Create a property file eg loadtest.properties (D:/PT/loadtest/loadtest.properties).
  2. Add your parameters

Thread1=10
Thread2=20
Thread3=30
Thread4=10 
Thread5=20
Thread6=30
Thread7=10 
Thread8=20 
Thread9=30 
Thread10=10
Thread12=20 

  1. use -q option with file name

    jmeter -n -t {path of jmx file}/abc.jmx -l {path of jtl file}.jtl -q D:/PT/loadtest/loadtest.properties

Upvotes: 1

Dmitri T
Dmitri T

Reputation: 168147

As per JMeter User Manual

G, --globalproperty =

Define Global properties (sent to servers)

e.g. -Gport=123

or -Gglobal.properties

So you can create global.properties file and define your values like:

param1=value1
param2=value2
param3=value3
etc.

Once done you should be able to access the properties on remote slaves via __P() function like ${__P(param1)}

More information: How to Perform Distributed Testing in JMeter

Upvotes: 2

Related Questions