You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Basim Baassiri <ba...@baassiri.ca> on 2014/05/09 17:15:24 UTC
-D parameters not being passed to slave machines
Context:
I'm running a test in distributed mode and I'm noticing the parameters that
I pass on the command line are not making to the slaves
My test reads values from the command line and loads Variables From CSV
File based on what is passed him
My variable is in the test plan as follows
Name: MY_TEST_ENV
Value: ${__property(MY_TEST_ENV, MY_TEST_ENV,dev)}
I later build a string to be used as a filename for Variables From CSV
CSV File = ${MY_TEST_ENV}.txt
I start my slaves ./jmeter-server
and from the controller
./jmeter -n -r -t TestWebStress.jmx -DMY_TEST_ENV=aws
on the controller i can see in the logs
2014/05/09 14:38:04 INFO - jmeter.JMeter: Setting System property:
MY_TEST_ENV=aws
on the slave i can see
2014/05/09 14:38:12 DEBUG - jmeter.engine.util.ValueReplacer: About to
replace in property of type: class
org.apache.jmeter.testelement.property.StringProperty: MY_TEST_ENV
2014/05/09 14:38:12 DEBUG - jmeter.engine.util.ValueReplacer: Replacement
result: MY_TEST_ENV
2014/05/09 14:38:12 DEBUG - jmeter.engine.util.ValueReplacer: About to
replace in property of type: class
org.apache.jmeter.testelement.property.StringProperty:
${__property(MY_TEST_ENV, MY_TEST_ENV,dev)}
2014/05/09 14:38:12 DEBUG - jmeter.testelement.property.AbstractProperty:
Not running version, return raw function string
2014/05/09 14:38:12 DEBUG - jmeter.engine.util.ValueReplacer: Replacement
result: ${__property(MY_TEST_ENV, MY_TEST_ENV,dev)}
2014/05/09 14:38:12 DEBUG - jmeter.engine.util.ValueReplacer: About to
replace in property of type: class
org.apache.jmeter.testelement.property.StringProperty: =
2014/05/09 14:38:12 DEBUG - jmeter.engine.util.ValueReplacer: Replacement
result: =
2014/05/09 14:38:12 DEBUG - jmeter.testelement.property.AbstractProperty:
Not running version, return raw function string
2014/05/09 14:38:12 DEBUG - jmeter.engine.util.ValueReplacer: Replacement
result: MY_TEST_ENV=${__property(MY_TEST_ENV, MY_TEST_ENV,dev)}
My question is
how can ensure that what is passed on the command line at the controller
level is sent to the slaves
Any help would be appreciated
Re: -D parameters not being passed to slave machines
Posted by j....@jk-itberatung.de.
-G instead of -D does the trick. Common pitfall. Described in
documentation but overread by many.
Br,
Jörg
===============================
Zitat von Basim Baassiri <ba...@baassiri.ca>:
> Context:
> I'm running a test in distributed mode and I'm noticing the parameters that
> I pass on the command line are not making to the slaves
>
> My test reads values from the command line and loads Variables From CSV
> File based on what is passed him
>
> My variable is in the test plan as follows
> Name: MY_TEST_ENV
> Value: ${__property(MY_TEST_ENV, MY_TEST_ENV,dev)}
>
> I later build a string to be used as a filename for Variables From CSV
> CSV File = ${MY_TEST_ENV}.txt
>
> I start my slaves ./jmeter-server
>
> and from the controller
> ./jmeter -n -r -t TestWebStress.jmx -DMY_TEST_ENV=aws
>
> on the controller i can see in the logs
> 2014/05/09 14:38:04 INFO - jmeter.JMeter: Setting System property:
> MY_TEST_ENV=aws
>
> on the slave i can see
> 2014/05/09 14:38:12 DEBUG - jmeter.engine.util.ValueReplacer: About to
> replace in property of type: class
> org.apache.jmeter.testelement.property.StringProperty: MY_TEST_ENV
> 2014/05/09 14:38:12 DEBUG - jmeter.engine.util.ValueReplacer: Replacement
> result: MY_TEST_ENV
> 2014/05/09 14:38:12 DEBUG - jmeter.engine.util.ValueReplacer: About to
> replace in property of type: class
> org.apache.jmeter.testelement.property.StringProperty:
> ${__property(MY_TEST_ENV, MY_TEST_ENV,dev)}
> 2014/05/09 14:38:12 DEBUG - jmeter.testelement.property.AbstractProperty:
> Not running version, return raw function string
> 2014/05/09 14:38:12 DEBUG - jmeter.engine.util.ValueReplacer: Replacement
> result: ${__property(MY_TEST_ENV, MY_TEST_ENV,dev)}
> 2014/05/09 14:38:12 DEBUG - jmeter.engine.util.ValueReplacer: About to
> replace in property of type: class
> org.apache.jmeter.testelement.property.StringProperty: =
> 2014/05/09 14:38:12 DEBUG - jmeter.engine.util.ValueReplacer: Replacement
> result: =
> 2014/05/09 14:38:12 DEBUG - jmeter.testelement.property.AbstractProperty:
> Not running version, return raw function string
> 2014/05/09 14:38:12 DEBUG - jmeter.engine.util.ValueReplacer: Replacement
> result: MY_TEST_ENV=${__property(MY_TEST_ENV, MY_TEST_ENV,dev)}
>
> My question is
> how can ensure that what is passed on the command line at the controller
> level is sent to the slaves
>
> Any help would be appreciated
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org
Re: -D parameters not being passed to slave machines
Posted by sebb <se...@gmail.com>.
On 9 May 2014 16:15, Basim Baassiri <ba...@baassiri.ca> wrote:
> Context:
> I'm running a test in distributed mode and I'm noticing the parameters that
> I pass on the command line are not making to the slaves
>
> My test reads values from the command line and loads Variables From CSV
> File based on what is passed him
>
> My variable is in the test plan as follows
> Name: MY_TEST_ENV
> Value: ${__property(MY_TEST_ENV, MY_TEST_ENV,dev)}
>
> I later build a string to be used as a filename for Variables From CSV
> CSV File = ${MY_TEST_ENV}.txt
>
> I start my slaves ./jmeter-server
>
> and from the controller
> ./jmeter -n -r -t TestWebStress.jmx -DMY_TEST_ENV=aws
>
> on the controller i can see in the logs
> 2014/05/09 14:38:04 INFO - jmeter.JMeter: Setting System property:
> MY_TEST_ENV=aws
>
> on the slave i can see
> 2014/05/09 14:38:12 DEBUG - jmeter.engine.util.ValueReplacer: About to
> replace in property of type: class
> org.apache.jmeter.testelement.property.StringProperty: MY_TEST_ENV
> 2014/05/09 14:38:12 DEBUG - jmeter.engine.util.ValueReplacer: Replacement
> result: MY_TEST_ENV
> 2014/05/09 14:38:12 DEBUG - jmeter.engine.util.ValueReplacer: About to
> replace in property of type: class
> org.apache.jmeter.testelement.property.StringProperty:
> ${__property(MY_TEST_ENV, MY_TEST_ENV,dev)}
> 2014/05/09 14:38:12 DEBUG - jmeter.testelement.property.AbstractProperty:
> Not running version, return raw function string
> 2014/05/09 14:38:12 DEBUG - jmeter.engine.util.ValueReplacer: Replacement
> result: ${__property(MY_TEST_ENV, MY_TEST_ENV,dev)}
> 2014/05/09 14:38:12 DEBUG - jmeter.engine.util.ValueReplacer: About to
> replace in property of type: class
> org.apache.jmeter.testelement.property.StringProperty: =
> 2014/05/09 14:38:12 DEBUG - jmeter.engine.util.ValueReplacer: Replacement
> result: =
> 2014/05/09 14:38:12 DEBUG - jmeter.testelement.property.AbstractProperty:
> Not running version, return raw function string
> 2014/05/09 14:38:12 DEBUG - jmeter.engine.util.ValueReplacer: Replacement
> result: MY_TEST_ENV=${__property(MY_TEST_ENV, MY_TEST_ENV,dev)}
>
> My question is
> how can ensure that what is passed on the command line at the controller
> level is sent to the slaves
>
> Any help would be appreciated
http://jmeter.apache.org/usermanual/get-started.html#options
-G
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org
Re: -D parameters not being passed to slave machines
Posted by Basim Baassiri <ba...@baassiri.ca>.
I found my answer
instead of
./jmeter -n -r -t TestWebStress.jmx -DMY_TEST_ENV=aws
use
./jmeter -n -r -t TestWebStress.jmx -GMY_TEST_ENV=aws
-G, --globalproperty (argument)[=(value)]
Define Global properties (sent to servers)
e.g. -Gport=123
or -Gglobal.properties
On Fri, May 9, 2014 at 11:15 AM, Basim Baassiri <ba...@baassiri.ca> wrote:
> Context:
> I'm running a test in distributed mode and I'm noticing the parameters
> that I pass on the command line are not making to the slaves
>
> My test reads values from the command line and loads Variables From CSV
> File based on what is passed him
>
> My variable is in the test plan as follows
> Name: MY_TEST_ENV
> Value: ${__property(MY_TEST_ENV, MY_TEST_ENV,dev)}
>
> I later build a string to be used as a filename for Variables From CSV
> CSV File = ${MY_TEST_ENV}.txt
>
> I start my slaves ./jmeter-server
>
> and from the controller
> ./jmeter -n -r -t TestWebStress.jmx -DMY_TEST_ENV=aws
>
> on the controller i can see in the logs
> 2014/05/09 14:38:04 INFO - jmeter.JMeter: Setting System property:
> MY_TEST_ENV=aws
>
> on the slave i can see
> 2014/05/09 14:38:12 DEBUG - jmeter.engine.util.ValueReplacer: About to
> replace in property of type: class
> org.apache.jmeter.testelement.property.StringProperty: MY_TEST_ENV
> 2014/05/09 14:38:12 DEBUG - jmeter.engine.util.ValueReplacer: Replacement
> result: MY_TEST_ENV
> 2014/05/09 14:38:12 DEBUG - jmeter.engine.util.ValueReplacer: About to
> replace in property of type: class
> org.apache.jmeter.testelement.property.StringProperty:
> ${__property(MY_TEST_ENV, MY_TEST_ENV,dev)}
> 2014/05/09 14:38:12 DEBUG - jmeter.testelement.property.AbstractProperty:
> Not running version, return raw function string
> 2014/05/09 14:38:12 DEBUG - jmeter.engine.util.ValueReplacer: Replacement
> result: ${__property(MY_TEST_ENV, MY_TEST_ENV,dev)}
> 2014/05/09 14:38:12 DEBUG - jmeter.engine.util.ValueReplacer: About to
> replace in property of type: class
> org.apache.jmeter.testelement.property.StringProperty: =
> 2014/05/09 14:38:12 DEBUG - jmeter.engine.util.ValueReplacer: Replacement
> result: =
> 2014/05/09 14:38:12 DEBUG - jmeter.testelement.property.AbstractProperty:
> Not running version, return raw function string
> 2014/05/09 14:38:12 DEBUG - jmeter.engine.util.ValueReplacer: Replacement
> result: MY_TEST_ENV=${__property(MY_TEST_ENV, MY_TEST_ENV,dev)}
>
> My question is
> how can ensure that what is passed on the command line at the controller
> level is sent to the slaves
>
> Any help would be appreciated
>
>
>