You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Hugh Hunter <hh...@oversee.net> on 2007/07/10 22:27:30 UTC

Modulus in If Controller

Been struggling at this for a while.  I want to use an If Controller to
only call a sampler every 10 iterations through the test plan.  So I
have a counter storing as ${COUNT} and I've tried:

${COUNT} % 10 == 0

in the If Controller as well as

${COUNT} MOD 10 == 0

Any ideas?

--Hugh

-- 
Hugh Hunter
Sr. QA Engineer
------------------------------------
Oversee.net
818 W. 7th St. Suite 700
Los Angeles, CA 90017
Main: 213.408.0080
Fax: 213.892.1227
hhunter@oversee.net
www.oversee.net
------------------------------------


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


Re: Modulus in If Controller

Posted by sebb <se...@gmail.com>.
The If controller uses Javascript (Rhino).

There's some documentation here:

http://developer.mozilla.org/en/docs/JavaScript_Language_Resources

It looks like the operator is %, so I would try:

(${COUNT} % 10) == 0


S.
On 10/07/07, Hugh Hunter <hh...@oversee.net> wrote:
> Been struggling at this for a while.  I want to use an If Controller to
> only call a sampler every 10 iterations through the test plan.  So I
> have a counter storing as ${COUNT} and I've tried:
>
> ${COUNT} % 10 == 0
>
> in the If Controller as well as
>
> ${COUNT} MOD 10 == 0
>
> Any ideas?
>
> --Hugh
>
> --
> Hugh Hunter
> Sr. QA Engineer
> ------------------------------------
> Oversee.net
> 818 W. 7th St. Suite 700
> Los Angeles, CA 90017
> Main: 213.408.0080
> Fax: 213.892.1227
> hhunter@oversee.net
> www.oversee.net
> ------------------------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

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