You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2012/12/31 06:56:14 UTC
[Bug 54362] New: Error in using Javascript in While Controller.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54362
Bug ID: 54362
Summary: Error in using Javascript in While Controller.
Product: JMeter
Version: unspecified
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: HTTP
Assignee: issues@jmeter.apache.org
Reporter: ghazall_alii@hotmail.com
Classification: Unclassified
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)
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 54362] Error in using Javascript in While Controller.
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54362
--- Comment #1 from ghazall_alii@hotmail.com ---
Created attachment 29800
--> https://issues.apache.org/bugzilla/attachment.cgi?id=29800&action=edit
Attached Jmx file for your reference.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 54362] Error in using Javascript in While Controller.
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54362
Philippe Mouawad <p....@ubik-ingenierie.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |p.mouawad@ubik-ingenierie.c
| |om
Resolution|--- |INVALID
--- Comment #3 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
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
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 54362] Error in using Javascript in While Controller.
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54362
ghazall_alii@hotmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
OS| |All
--- Comment #2 from ghazall_alii@hotmail.com ---
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.
--
You are receiving this mail because:
You are the assignee for the bug.