On 13/01/2009, John Coleman <[email protected]> wrote:
>
>
>  > -----Original Message-----
>  > From: sebb [mailto:[email protected]]
>
> > Sent: 13 January 2009 12:07
>  > To: JMeter Users List
>  > Subject: Re: Frequency controller
>  >
>
> > On 13/01/2009, John Coleman <[email protected]> wrote:
>
> 8<
>  > > We manipulate vars in beanshell to produce a random frequency, and
>  > > then  need to test the vars value in the If condition for a
>  > match. Is
>  > > there a  native javascript reference to the vars object
>  > found in beanshell?
>  >
>  > Yes, see:
>  >
>  > http://jakarta.apache.org/jmeter/usermanual/functions.html#__j
>  > avaScript
>
>
> I tried this condition ${count} == vars.get("spotNextCount") but got the
>  error below:
>
>  2009/01/13 14:12:51 ERROR - jmeter.control.IfController: ReferenceError:
>  "vars" is not defined. (<cmd>#1) org.mozilla.javascript.EcmaError:
>  ReferenceError: "vars" is not defined. (<cmd>#1)
>
>  Any ideas please?

Unfortunately the "vars" variable is only defined for the
__javaScript() function, not for Javascript expressions evaluated by
the If Controller.

However, the following is equivalent:

${count} == ${spotNextCount}

>  TIA,
>
> John
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [email protected]
>  For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to