I'm running JMeter 2.0.1 now, and having great difficulty with the syntax of the 
"Condition" field of the If Controller.  The only way I've managed to get it to 
evaluate as TRUE was to put the string "true" in as the Condition.  I can't figure our 
the JavaScript syntax it wants to execute a conditional.  What is the correct syntax 
to compare a JMeter variable to a static string and return a boolean?  I want to 
compare my variable ${res} to the string "ERROR", and return true if they are 
equivalent.

I tried these syntaxes:

"${res}"=="ERROR"
${res}=="ERROR"
${res}==ERROR

${javascript(("${res}"=="ERROR"),foo)} 
${javascript((${res}=="ERROR"),foo)} 
${javascript((${res}==ERROR),foo)}

I also tried setting the value of ${res} to "true" directly and simply putting 
"${res}" as the Condition, but that did not work either. Only hardcoding the condition 
as "true" caused the samplers under the If Controller to run for me.

Thanks in advance!

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to