jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryabtsev Vladimir <v.ryabt...@pflb.ru>
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.

-----
VR


-----Original Message-----
From: Harperdev [mailto:hcappdev2@gmail.com] 
Sent: Friday, August 15, 2014 7:51 AM
To: jmeter-user@jakarta.apache.org
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?

Thanks.



--
View this message in context: http://jmeter.512774.n5.nabble.com/Clearing-variables-each-thread-tp5720840p5720842.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


Mime
View raw message