jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryabtsev Vladimir <>
Subject RE: Clearing variables each thread
Date Fri, 15 Aug 2014 05:38:11 GMT
Yes, Harperdev, each separate thread has its own set of values. They are initialized by User
Defined Variables element or root element. Then values (changed or not) proceed to the next
iteration of the same thread.

As you are talking about variables of form ZZZ_matchNr I suppose you are using RegEx extractor
with Match No=-1. You can easily clear all generated values by applying the same RegEx Extractor
to an empty input. For example you can add empty BeanShell sampler and child RegEx extractor
at the beginning of the thread. The only left value will be ZZZ_matchNr=0.

As another option you can iterate through your variables in BeanShell sampler and initialize
or remove them.


-----Original Message-----
From: Harperdev [] 
Sent: Friday, August 15, 2014 7:51 AM
Subject: Re: Clearing variables each thread

Oh, I understand now it is keeping separate variables per thread...

What I want is to clear the variables each time a thread in my threadgroup loops. So, maybe
my threadgroup is set to use 2 threads and loop forever, every time one of those threads starts
over, I would like the variables cleared out.

Is that possible?

My only thought was to use a BeanShell Sampler to go through all the known ZZZ_i_gi (i from
1 to ZZZ_matchNr), etc., variables and remove them at the beginning of the thread. Is that
the best option?


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