jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Noel O'Brien <>
Subject Resetting a "Counter" Preprocessor
Date Thu, 12 Feb 2009 12:24:12 GMT
Hi All,

Is it possible to reset a counter preprocessor? I've been pulling my hair out 
about it all morning.

I've got a For Each controller which contain a Simple controller and a Loop 
controller respectively. The loop controller contains a Counter, which I 
would like to reset each time the For Each controller iterates. I've tried 
resetting the variable that the counter writes to ('count') but it appears 
the count index is maintained in the Counter element, and over-writes any 
value I've set in the 'count' variable. 

I've worked around the problem by implementing a "My Counter" Beanshell 
Preprocessor that I've put in the Loop controller and a "Reset Counter" 
Beanshell Postprocessor in the Simple controller. While my solution works, 
I'd prefer to stick to build-in modules for this kind of thing, otherwise 
maintaining test plans becomes more difficult and error-prone.

Does anyone know of a more elegant solution? Maybe the Counter element could 
be modified to allow it to be reset?


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

View raw message