I like your idea of pre-processing the jmx as the test is cleaner to run. An
If-Controller as suggested by sebb works but due to the fact that timers are
evaluated *before* samplers it takes a long while for meter to finish even
though some sparsely running samplers are meant to be 'disabled'.
For example jmeter will wait 8 minutes before stopping thread group A
-Thread Group A (1 thread, loops 100 times - sends a request every 8
minutes)
--Java sampler
--Constant timer (8 minutes)
--If Controller: property(groupA.enabled) is not true
----Test Action: stop current thread
-Group Group B
--Java sampler
--Constant timer
--If Controller: property(groupB.enabled) is not true
----Test Action: stop current thread
Marc Chiarini (Tufts) wrote:
>
> Hi Viet,
>
> One kludgy thing you could do is to create a perl or shell script to
> modify your .jmx (xml) file and write a new temporary .jmx file with the
> appropriate thread groups enabled/disabled. Your script would then run
> that temporary .jmx. At the end, your script would erase the temporary
> .jmx. This should be easy enough if you give your groups unique names
> for which you can search with a regexp. Then just search for the first
> enclosing ="enabled" (or disabled), and set it to what you want.
>
> Regards,
> Marc
>
> viet nguyen wrote:
>> my plan is as follows
>>
>> ThreadGroup1 (loop 2000 times)
>> --java request
>> --constant timer
>>
>> ThreadGroup2 (loop 1000 times)
>> --java request
>> --constant timer
>>
>> How do I use properties to enable/disable a particular thread group? or
>> is
>> there other mechanism to do so without creating 2 different jmx files or
>> the
>> obvious right-click enable/disable? Another word I want to run the load
>> test with varying configuration from the command line
>>
>> jmeter -nt loadtest.jmx -q lite.properties (run thread group A only)
>>
>> or
>>
>> jmeter -nt loadtest.jmx -q full.properties (run a full blown 2 thread
>> groups)
>>
>>
>>
>>
>>
>
> --
> Marc Chiarini
> CompSci PhD Candidate
> Tufts University
> Medford, MA 02155
> http://www.cs.tufts.edu/~mchiar01
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
--
View this message in context:
http://www.nabble.com/how-to-enable-disable-threadgroup-from-cmd-line-tp23335687p23371608.html
Sent from the JMeter - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]