0
votes

I have a single master and 5 slave agents. I am starting my test using the command line option from the master by specifying the slave machines using the -R option.

$JMETER_HOME/current/bin/jmeter -n -t test.jmx -R host1,host2  -l testresult.jtl -Jthreads=$THREADS -Jrampup=$RAMPUP -Jtestduration=$TESTDURATION -JENV=$ENV -e -o ./testreport

I see that the new values that are passed in the command line using the -J switch are not getting applied when the test plan is transferred to the slave machines. Slaves are using only the hardcoded values in the JMX.

1
Did you define the properties in the jmx with the _P function?Ray Oei
Yes. I did. All the values that are used in -J have been defined inside the JMX using the _P functionSelva

1 Answers

4
votes

According to Jmeter Doc on Overriding Properties Via The Command Line

-J[prop_name]=[value]
defines a local JMeter property.
-G[prop_name]=[value]
defines a JMeter property to be sent to all remote servers.

So, you need to use -G flag for Jmeter property to be sent to all remote servers.