On 30/05/07, Lenin Basheer <[EMAIL PROTECTED]> wrote:
Hi All,
I ve been tryintg to get the javaScript() to work with jmeter for a specfic
scenario that i am testing. I havent been succesfull and there fore seeking
ur help.
What are you trying to achieve?
This is the java script that i wrote ;
${__javaScript(${flightNumber}==10 ? ${i} += 1; : ${i}
,flightDate )}
Assuming flightNumber = 7 and i = 3 then the script:
${flightNumber}==10 ? ${i} += 1; : ${i}
becomes:
7==10 ? 3 += 1;: 3
which is not valid.
Variable references are replaced by their values.
I have the javaScript as a user parameter , with
name : date
value : ${__javaScript(${flightNumber}==10 ? ${i} += 1; :
${i} ,flightDate )}
However i cant get it value ${i} to increment.
Another option that i tried was to increment the value using a
_counter(FALSE,flightDate) with in an if controller that checks if
flightnumber = 10.
However the variable flight date goes null outside the scope of the if
controller.
Initialise it outside the If Controller.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]