https://issues.apache.org/bugzilla/show_bug.cgi?id=47793
Summary: Javascript expression with tertiary operator and
apostrophes fails
Product: JMeter
Version: 2.3.4
Platform: PC
OS/Version: Windows Vista
Status: NEW
Severity: normal
Priority: P2
Component: Main
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Andreas Krueger <[email protected]> 2009-09-07
08:20:48 PDT ---
Created an attachment (id=24220)
JMeter testplan which fails after starting
When using the following Javascript expression on the right side of an UDV
definition, the test fails at run time with a report in the jmeter.log:
expression:
${__javaScript('${key}'=='x'?${key}:${E1}${E2})}
jmeter.log:
2009/09/07 17:19:29 ERROR - jmeter.threads.JMeterThread: Error while processing
sampler 'HTTP Request' : org.mozilla.javascript.EvaluatorException: missing ;
before statement (<cmd>#1)
at
org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:98)
at
org.mozilla.javascript.DefaultErrorReporter.error(DefaultErrorReporter.java:85)
at org.mozilla.javascript.Parser.addError(Parser.java:126)
at org.mozilla.javascript.Parser.reportError(Parser.java:132)
at org.mozilla.javascript.Parser.statementHelper(Parser.java:1175)
at org.mozilla.javascript.Parser.statement(Parser.java:623)
at org.mozilla.javascript.Parser.parse(Parser.java:355)
at org.mozilla.javascript.Parser.parse(Parser.java:293)
at org.mozilla.javascript.Context.compileImpl(Context.java:2238)
at org.mozilla.javascript.Context.compileString(Context.java:1284)
at org.mozilla.javascript.Context.compileString(Context.java:1273)
at org.mozilla.javascript.Context.evaluateString(Context.java:1129)
at org.apache.jmeter.functions.JavaScript.execute(JavaScript.java:89)
at
org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:143)
at
org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:112)
at
org.apache.jmeter.testelement.property.FunctionProperty.getStringValue(FunctionProperty.java:89)
at
org.apache.jmeter.modifiers.UserParameters.setValues(UserParameters.java:144)
at
org.apache.jmeter.modifiers.UserParameters.process(UserParameters.java:130)
at
org.apache.jmeter.threads.JMeterThread.runPreProcessors(JMeterThread.java:636)
at
org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:333)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:243)
at java.lang.Thread.run(Unknown Source)
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]