You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by danimni <da...@gmail.com> on 2015/03/08 12:51:25 UTC

Is there a way to pause/resume thread group according to variable value?

Hi All,
In my test, i have two 'Thread Groups' that run concurrently.
in the *second *'Thread Groups' i have a sample that requires the *first
*'Thread Groups' to pause, so I’ve defined property, shared between both
Thread Groups. In the first 'Thread Groups', I have “IF” controller that
checks the value of that property and pauses (using 'Test Action' element)
the all threads accordingly. 
The process of the *second *thread group *max timeout* is 10 minutes, so in
the "pause" 'Test Action' element, I set 600,000 before resuming. 
In most cases, the process takes 1-2 minutes. the problem *i can't resume
the first thread group dynamically*. it "must" wait all 10 minutes before
resuming..
is there another way to do so?




--
View this message in context: http://jmeter.512774.n5.nabble.com/Is-there-a-way-to-pause-resume-thread-group-according-to-variable-value-tp5721901.html
Sent from the JMeter - User mailing list archive at Nabble.com.

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


Re: Is there a way to pause/resume thread group according to variable value?

Posted by sebb <se...@gmail.com>.
Or you might be able to use

http://jmeter.apache.org/usermanual/component_reference.html#Critical_Section_Controller

On 10 March 2015 at 08:21, Ryabtsev Vladimir <v....@pflb.ru> wrote:
> Hi danimni,
> If you want to pause thread 1 until some event happens in thread 2 you could use Inter-Thread Communication (http://jmeter-plugins.org/wiki/InterThreadCommunication/?utm_source=jmeter&utm_medium=helplink&utm_campaign=InterThreadCommunication) or some other queue implementation in JSR223 sampler.
>
> VR
>
> -----Original Message-----
> From: danimni [mailto:danimni@gmail.com]
> Sent: Sunday, March 08, 2015 2:51 PM
> To: jmeter-user@jakarta.apache.org
> Subject: Is there a way to pause/resume thread group according to variable value?
>
> Hi All,
> In my test, i have two 'Thread Groups' that run concurrently.
> in the *second *'Thread Groups' i have a sample that requires the *first *'Thread Groups' to pause, so I’ve defined property, shared between both Thread Groups. In the first 'Thread Groups', I have “IF” controller that checks the value of that property and pauses (using 'Test Action' element) the all threads accordingly.
> The process of the *second *thread group *max timeout* is 10 minutes, so in the "pause" 'Test Action' element, I set 600,000 before resuming.
> In most cases, the process takes 1-2 minutes. the problem *i can't resume the first thread group dynamically*. it "must" wait all 10 minutes before resuming..
> is there another way to do so?
>
>
>
>
> --
> View this message in context: http://jmeter.512774.n5.nabble.com/Is-there-a-way-to-pause-resume-thread-group-according-to-variable-value-tp5721901.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>

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


RE: Is there a way to pause/resume thread group according to variable value?

Posted by Ryabtsev Vladimir <v....@pflb.ru>.
Hi danimni,
If you want to pause thread 1 until some event happens in thread 2 you could use Inter-Thread Communication (http://jmeter-plugins.org/wiki/InterThreadCommunication/?utm_source=jmeter&utm_medium=helplink&utm_campaign=InterThreadCommunication) or some other queue implementation in JSR223 sampler.

VR

-----Original Message-----
From: danimni [mailto:danimni@gmail.com] 
Sent: Sunday, March 08, 2015 2:51 PM
To: jmeter-user@jakarta.apache.org
Subject: Is there a way to pause/resume thread group according to variable value?

Hi All,
In my test, i have two 'Thread Groups' that run concurrently.
in the *second *'Thread Groups' i have a sample that requires the *first *'Thread Groups' to pause, so I’ve defined property, shared between both Thread Groups. In the first 'Thread Groups', I have “IF” controller that checks the value of that property and pauses (using 'Test Action' element) the all threads accordingly. 
The process of the *second *thread group *max timeout* is 10 minutes, so in the "pause" 'Test Action' element, I set 600,000 before resuming. 
In most cases, the process takes 1-2 minutes. the problem *i can't resume the first thread group dynamically*. it "must" wait all 10 minutes before resuming..
is there another way to do so?




--
View this message in context: http://jmeter.512774.n5.nabble.com/Is-there-a-way-to-pause-resume-thread-group-according-to-variable-value-tp5721901.html
Sent from the JMeter - User mailing list archive at Nabble.com.

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


Re: Is there a way to pause/resume thread group according to variable value?

Posted by Flavio Cysne <fl...@gmail.com>.
You could replace the Test Action by a While Controller, an If Controller
and a Constant Timer. The main idea is to check the property value from
time to time and get out the loop after getting the expected value or after
a defined number of loops.