I am using While Controller with Condition: ${_javaScript("${DONE}" ! = "Resolved and Downloaded";)} Where initially DONE="Not Assigned yet" After few Iterations DONE changes and has value "Resolved and Downloaded"(which I check in Debug Sampler) but loop continues and doesn't quit.In .log file it is getting this error: ERROR - jmeter.functions.JavaScript: Error processing Javascript: ['Nothing Assigned Yet' ! = 'Resolved and Downloaded' ] org.mozilla.javascript.EvaluatorException: missing ; before statement (<cmd>#1) at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:109) at org.mozilla.javascript.DefaultErrorReporter.error(DefaultErrorReporter.java:96) at org.mozilla.javascript.Parser.addError(Parser.java:230) at org.mozilla.javascript.Parser.addError(Parser.java:208) at org.mozilla.javascript.Parser.reportError(Parser.java:265) at org.mozilla.javascript.Parser.reportError(Parser.java:252) at org.mozilla.javascript.Parser.reportError(Parser.java:245) at org.mozilla.javascript.Parser.autoInsertSemicolon(Parser.java:1109) at org.mozilla.javascript.Parser.statementHelper(Parser.java:1086) at org.mozilla.javascript.Parser.statement(Parser.java:943) at org.mozilla.javascript.Parser.parse(Parser.java:568) at org.mozilla.javascript.Parser.parse(Parser.java:506) at org.mozilla.javascript.Context.compileImpl(Context.java:2401) at org.mozilla.javascript.Context.compileString(Context.java:1367) at org.mozilla.javascript.Context.compileString(Context.java:1356) at org.mozilla.javascript.Context.evaluateString(Context.java:1108) at org.apache.jmeter.functions.JavaScript.execute(JavaScript.java:88) at org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:145) at org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:120) at org.apache.jmeter.testelement.property.FunctionProperty.getStringValue(FunctionProperty.java:99) at org.apache.jmeter.control.WhileController.getCondition(WhileController.java:125) at org.apache.jmeter.control.WhileController.endOfLoop(WhileController.java:56) at org.apache.jmeter.control.WhileController.next(WhileController.java:102) at org.apache.jmeter.control.WhileController.nextIsNull(WhileController.java:82) at org.apache.jmeter.control.GenericController.next(GenericController.java:167) at org.apache.jmeter.control.WhileController.next(WhileController.java:106) at org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:211) at org.apache.jmeter.control.GenericController.next(GenericController.java:172) at org.apache.jmeter.control.LoopController.next(LoopController.java:108) at org.apache.jmeter.threads.AbstractThreadGroup.next(AbstractThreadGroup.java:86) at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:277) at java.lang.Thread.run(Unknown Source)
Created attachment 29800 [details] Attached Jmx file for your reference.
I also tried with single quotes , like ${_javaScript('${DONE}' ! = 'Resolved and Downloaded')} withoutspaces, something like ${_javaScript("${DONE}" ! = "ResolvedandDownloaded")} nothing woked. got same exception each time.
Hello, I don't understand , your JMX attached file works fine for me. But the expressions you show in comments are wrong: ${_javaScript("${DONE}" ! = "Resolved and Downloaded";)} => there is a space character between ! and = , and _javaScript should be __javaScript Same for: ${_javaScript('${DONE}' ! = 'Resolved and Downloaded')} and ${_javaScript("${DONE}" ! = "ResolvedandDownloaded")} Just put this: ${__javaScript("${DONE}"!="Resolved and Risk Data Downloaded")} and it works OK
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3023