jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <>
Subject Re: Setting a varaiable on a thread group stopping
Date Fri, 06 May 2011 21:14:20 GMT
On 6 May 2011 19:31, Eric Gandt <> wrote:
> I have 3 thread groups defined they consist of:
> Caching: to ensure the server is properly setup for Test

So this could be run as a separate JMeter test.

> Monitor: to monitor the health of apache, which should run as long as Test
> is running
> Test: Test thread group

These can be run together, but the Test needs to be able to shut the
monitor down.

> What I have are 2 variables defined:
>  PreCache = 1
>  RunTest = 0
> I have it setup using an If Controller so that the pre-cache is only
> executed when PreCache=1
> When PreCache is finished I want it to set PreCache=0 and set RunTest=1
> When Test is done I want it to set RunTest=0  so that the Monitor thread is
> stopped automatically.
> Basically this all depends upon setting a variable when a Thread Group
> finishes executing, which I'm unsure how to do, or even if there is a better
> way to do this, as this seems imperfect, but I did not see a better way
> within the Jmeter framework to do this.

As indicated above, I would probably create a separate JMX file to do
the test setup.

Then have two thread groups running in parallel:

Test (loop = 1)
+ Loop controller (as desired)
+ + Samplers etc
+ + ...
+ Test Action: Stop/Stop All Threads

Monitor (run forever)

The next release of JMeter will have setUp/tearDown thread groups; the
setUp TG is intended for setting up tests; in your case the Caching TG

You would still need to use the Test Action (or similar) to stop the Monitor.

> Thanks,
> --
> View this message in context:
> Sent from the JMeter - User mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message