On 6/1/05, Andy Kappen <[EMAIL PROTECTED]> wrote: > I have been trying to use the "While Controller" in JMeter 2.0.3 with > no luck. This could be due > to two things: user error (since I'm not sure my Condition is in the > correct form), or the While > Controller is a little too alpha not work as advertised. > > Inside the While Controller, I grab a page using "HTTP Request > Sampler" and use "Regular > Expression Extractor" to populate a variable called "encodedState". I > would like the While > Controller to loop until encodedState equals the string "ENCODED".
Another way to do this would be to use the LAST condition with a suitable Response Assertion to flag the Sampler as failed. > I have tried a variety of conditions on the While Controller with no > luck. What should the > condition look like? Javascript? Pure java? BeanShell? I tried This is documented here: http://jakarta.apache.org/jmeter/usermanual/component_reference.html#While_Controller > several guesses: Assume encodedState = ENCODED. > ${encodedState} != "ENCODED" This is interpreted as the string: ENCODED != "ENCODED" which is not the same as FALSE or false. > ${__javaScript(${encodedState}!="ENCODED")} Almost correct, this is interpreted as the string: ENCODED != "ENCODED" which is not valid JavaScript [well, unless ENCODED is a JavaScript variable] ${__javaScript("${encodedState}"!="ENCODED")} should work, i.e. quote the string. > !(${encodedState}.equals("ENCODED")) This is interpreted as the string !(ENCODED.equals("ENCODED")) which is not false or FALSE Try ${__BeanShell(!"${encodedState}".equals("ENCODED")) S. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

