Le 13/05/2011 13:53, sebb a écrit :
On 13 May 2011 12:39, DjinnS<dji...@chninkel.net>  wrote:
Bonjour,

I'm going crazy ! I can't used $__JavaScript{} to get a ratio.

I try to use the following code (in a "User Defined Variable"):

${__JavaScript(Math.round(10*50/100))}
There is no such function as __JavaScript.

(in fact, "10" is also a value from an another "User Defined Variable")

This code don't work.

If I try a very simple math operation, like this:

${__JavaScript(1+1)}

It's ok !
No, that fails for the same reason.

See:

http://jakarta.apache.org/jmeter/usermanual/functions.html#__javaScript

What's going wrong with my first code ?
_Both_ are spelt incorrectly.

Yes, there is a mistake in my email.

So, with the correct spelt, my function is:

${__javaScript(Math.round(${var}*50/100),total)}

It isn't working.

If I follow the documentation, I think I use correctly jemeter's variables in function.

No ?

Thx in advance,

Rergards,


--
DjinnS

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


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



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

Reply via email to