You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Krishnakanth <kr...@gmail.com> on 2008/12/11 11:12:46 UTC

passing Number of threads from command prompt

If there are few thread groups in a Jmeter test plan and if we want to pass
the number of threads (users),
Ramp up time as parameters from command prompt in the below mentioned way.
Does this work?

To specify 1 user per user group for 5 groups (total 5 users), ramp up in 1
second, 
and 25 loops each group iterates over the same operation set:

./bin/jmeter.lucene -t MyWebPerfScenario.jmx \\
-Jgroup1.threads=1 -Jgroup1.loops=25 -Jgroup1.rampup=1  \\
-Jgroup2.threads=1 -Jgroup2.loops=25 -Jgroup2.rampup=1  \\
-Jgroup3.threads=1 -Jgroup3.loops=25 -Jgroup3.rampup=1  \\
-Jgroup4.threads=1 -Jgroup4.loops=25 -Jgroup4.rampup=1  \\
-Jgroup5.threads=1 -Jgroup5.loops=25 -Jgroup5.rampup=1
I tried it, but its not taking the parameters. Do we have to make some
changes in the Jmeter.properties file to do so? 


-- 
View this message in context: http://www.nabble.com/passing-Number-of-threads-from-command-prompt-tp20952721p20952721.html
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


RE: passing Number of threads from command prompt

Posted by Steve Kapinos <St...@tandberg.com>.
In the test plan, in the thread group settings, populate those fields
with functions that evaluate a property.

So you make up a bunch of parameters, something like

pThreadGroup1
pThreadGroup1ramp
pThreadGroup2
pThreadGroup2ramp
...
Etc

In the test plan itself, define the number of users for ThreadGroup1 to
be a function that evaluates the property
${__P(pThreadGroup1)}

And the rampup to be
${__P(pThreadGroup1ramp)}

Then when you run the test plan, pass the values to use for the
properties.. either via a properties file or via command line switches
Jmeter -t testplan.jmx -JpThreadGroup1=10

Etc

-Steve

-----Original Message-----
From: Krishnakanth [mailto:krishnakanth.pps@gmail.com] 
Sent: Friday, December 12, 2008 1:18 AM
To: jmeter-user@jakarta.apache.org
Subject: Re: passing Number of threads from command prompt


Hi Sebb.

Could you get a little deeper. Where should I find this file. 
probably a 2-3 steps would be awesome from your part.

Pleaseee..

thanks.
Krishnakanth

sebb-2-2 wrote:
> 
> 2008/12/11 Krishnakanth <kr...@gmail.com>:
>>
>> If there are few thread groups in a Jmeter test plan and if we want
to
>> pass
>> the number of threads (users),
>> Ramp up time as parameters from command prompt in the below mentioned
>> way.
>> Does this work?
>>
>> To specify 1 user per user group for 5 groups (total 5 users), ramp
up in
>> 1
>> second,
>> and 25 loops each group iterates over the same operation set:
>>
>> ./bin/jmeter.lucene -t MyWebPerfScenario.jmx \\
>> -Jgroup1.threads=1 -Jgroup1.loops=25 -Jgroup1.rampup=1  \\
>> -Jgroup2.threads=1 -Jgroup2.loops=25 -Jgroup2.rampup=1  \\
>> -Jgroup3.threads=1 -Jgroup3.loops=25 -Jgroup3.rampup=1  \\
>> -Jgroup4.threads=1 -Jgroup4.loops=25 -Jgroup4.rampup=1  \\
>> -Jgroup5.threads=1 -Jgroup5.loops=25 -Jgroup5.rampup=1
>> I tried it, but its not taking the parameters. Do we have to make
some
>> changes in the Jmeter.properties file to do so?
>>
> 
> No, but you do need to refer to the properties in the appropriate
> thread group GUI fields.
> 
> For example, in the Ramp-up field, use ${__P(group1.rampup)} etc.
> 
> 
>> --
>> View this message in context:
>>
http://www.nabble.com/passing-Number-of-threads-from-command-prompt-tp20
952721p20952721.html
>> Sent from the JMeter - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/passing-Number-of-threads-from-command-prompt-tp20
952721p20970476.html
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: passing Number of threads from command prompt

Posted by Krishnakanth <kr...@gmail.com>.
Hi Sebb.

Could you get a little deeper. Where should I find this file. 
probably a 2-3 steps would be awesome from your part.

Pleaseee..

thanks.
Krishnakanth

sebb-2-2 wrote:
> 
> 2008/12/11 Krishnakanth <kr...@gmail.com>:
>>
>> If there are few thread groups in a Jmeter test plan and if we want to
>> pass
>> the number of threads (users),
>> Ramp up time as parameters from command prompt in the below mentioned
>> way.
>> Does this work?
>>
>> To specify 1 user per user group for 5 groups (total 5 users), ramp up in
>> 1
>> second,
>> and 25 loops each group iterates over the same operation set:
>>
>> ./bin/jmeter.lucene -t MyWebPerfScenario.jmx \\
>> -Jgroup1.threads=1 -Jgroup1.loops=25 -Jgroup1.rampup=1  \\
>> -Jgroup2.threads=1 -Jgroup2.loops=25 -Jgroup2.rampup=1  \\
>> -Jgroup3.threads=1 -Jgroup3.loops=25 -Jgroup3.rampup=1  \\
>> -Jgroup4.threads=1 -Jgroup4.loops=25 -Jgroup4.rampup=1  \\
>> -Jgroup5.threads=1 -Jgroup5.loops=25 -Jgroup5.rampup=1
>> I tried it, but its not taking the parameters. Do we have to make some
>> changes in the Jmeter.properties file to do so?
>>
> 
> No, but you do need to refer to the properties in the appropriate
> thread group GUI fields.
> 
> For example, in the Ramp-up field, use ${__P(group1.rampup)} etc.
> 
> 
>> --
>> View this message in context:
>> http://www.nabble.com/passing-Number-of-threads-from-command-prompt-tp20952721p20952721.html
>> Sent from the JMeter - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/passing-Number-of-threads-from-command-prompt-tp20952721p20970476.html
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: passing Number of threads from command prompt

Posted by sebb <se...@gmail.com>.
2008/12/11 Krishnakanth <kr...@gmail.com>:
>
> If there are few thread groups in a Jmeter test plan and if we want to pass
> the number of threads (users),
> Ramp up time as parameters from command prompt in the below mentioned way.
> Does this work?
>
> To specify 1 user per user group for 5 groups (total 5 users), ramp up in 1
> second,
> and 25 loops each group iterates over the same operation set:
>
> ./bin/jmeter.lucene -t MyWebPerfScenario.jmx \\
> -Jgroup1.threads=1 -Jgroup1.loops=25 -Jgroup1.rampup=1  \\
> -Jgroup2.threads=1 -Jgroup2.loops=25 -Jgroup2.rampup=1  \\
> -Jgroup3.threads=1 -Jgroup3.loops=25 -Jgroup3.rampup=1  \\
> -Jgroup4.threads=1 -Jgroup4.loops=25 -Jgroup4.rampup=1  \\
> -Jgroup5.threads=1 -Jgroup5.loops=25 -Jgroup5.rampup=1
> I tried it, but its not taking the parameters. Do we have to make some
> changes in the Jmeter.properties file to do so?
>

No, but you do need to refer to the properties in the appropriate
thread group GUI fields.

For example, in the Ramp-up field, use ${__P(group1.rampup)} etc.


> --
> View this message in context: http://www.nabble.com/passing-Number-of-threads-from-command-prompt-tp20952721p20952721.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org