Interesting bug. I imaging this is because the __P function reads the
jmeter property at the time the test is run. When you specify the "-r"
option, that means the test is being sent to a remote server and then
run, but the remote server knows nothing about the jmeter property
values on the client machine. At run time, __P is evaluated, no such
property is found, and the default is used.
If you could enter it into the bug database, that would be helpful.
-Mike
On Fri, 2005-01-14 at 19:47, Kantorzyk, Martin wrote:
> I am having a problem with JMeter not reading from the command line when
> using the "-r" option. For example, setting the Thread Group's "Number of
> Threads". However, it will use the default value specified in the ${__P()}
> function.
>
> Whenever I remove the -r option from the command line my JMeter reads the
> correct value specified on the command line.
>
> *** Here is an example of my JMeter script.
> TestPlan
> |
> -Thread Group [ Number of Threads = ${__P(group1.threads,5)} ]
> |
> --HTTP Request Defaults [ Server Name =
> (${__P(serverName,)}) ]
> |
> --HTTP Request
> | |
> | ---Response Assertion
> |
> --Aggregate Report
>
>
> *** Here is the command line to start the JMeter script.
> jmeter -n -t C:\Test.jmx -JserverName=%1 -Jgroup1.threads=%2 -l
> %SCALA_RESULTS%\%Results%%2.csv -r
>
> *** Here is the results of the script from the console window
> Created the tree successfully
> Configuring remote engine for 10.180.77.61
> [Full GC 6508K->668K(396544K), 0.0571472 secs]
> Starting remote engines
> Remote engines have been started
> Tidying up ...
> ... end of run
>
> *** However it uses the default value for the threads, which is specified in
> the jmx file. I tried not specifying the default value but then test hangs
> when the -r option is specified. Anything that maybe suspect that I could
> check?
>
> Thanks!!! -- Martin
>
> -----Original Message-----
> From: Michael Stover [mailto:[EMAIL PROTECTED]
> Sent: Thursday, January 13, 2005 8:55 AM
> To: JMeter Users List
> Subject: Re: Can I specify the number of threads via command line
> parameter
>
>
> Yes, it is. You would use the __P function in the Thread Group's
> "number of threads" input box, and on the command line, you'd use
> -JnameOfProperty=5 to set the value of the property.
>
> See
> http://jakarta.apache.org/jmeter/usermanual/functions.html#__P
> http://jakarta.apache.org/jmeter/usermanual/get-started.html#override
>
> On Thu, 2005-01-13 at 08:21, Erasmus, Ronel wrote:
> > Hallo ,
> >
> > I have a jmeter script with number of threads = 1.
> > I want to be able to specify the number of threads when I invoke the script
> > from the command line. Is that possible?
> >
> > Thanks in advance,
> > R Erasmus
--
Michael Stover <[EMAIL PROTECTED]>
Apache Software Foundation
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]