jmeter.functions错误:jexl.parser.ParseException:遇到" {"

时间:2015-10-14 07:37:52

标签: jmeter performance-testing jmeter-plugins

我用jmeter进行加载测试。我指定了"线程组" as" $ {__ jexl($ {LoadRatio} * 1,)}"。我遇到下面的错误。有什么问题?

2015/10/14 15:36:25 ERROR - jmeter.functions.JexlFunction: An error occurred while evaluating the expression "${LoadRatio}*1"

org.apache.commons.jexl.parser.ParseException:遇到" {"在第1栏第2栏。 期待以下之一:     " ||" ...     "或" ...     "&安培;&安培;" ...     "和" ...     " |" ...     " ^" ...     "&安培;" ...     " ==" ...     "当量" ...     "!=" ...     " NE" ...     "<" ...     " LT" ...     ">" ...     " GT" ...     "< =" ...     "文件" ...     "> =" ...     " GE" ...     " +" ...     " - " ...     " *" ...     " /" ...     " DIV" ...     "%" ...     " MOD" ...     &#34 ;;" ...     " [" ...     "" ...     " =" ...

at org.apache.commons.jexl.parser.Parser.generateParseException(Parser.java:4176)
at org.apache.commons.jexl.parser.Parser.jj_consume_token(Parser.java:4043)
at org.apache.commons.jexl.parser.Parser.ExpressionExpression(Parser.java:1885)
at org.apache.commons.jexl.parser.Parser.Statement(Parser.java:1858)
at org.apache.commons.jexl.parser.Parser.JexlScript(Parser.java:73)
at org.apache.commons.jexl.parser.Parser.parse(Parser.java:32)
at org.apache.commons.jexl.ScriptFactory.createNewScript(ScriptFactory.java:162)
at org.apache.commons.jexl.ScriptFactory.createScript(ScriptFactory.java:99)
at org.apache.jmeter.functions.JexlFunction.execute(JexlFunction.java:79)
at org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:142)
at org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:118)
at kg.apc.jmeter.threads.SteppingThreadGroupGui.refreshPreview(SteppingThreadGroupGui.java:240)
at kg.apc.jmeter.threads.SteppingThreadGroupGui.modifyTestElement(SteppingThreadGroupGui.java:263)
at org.apache.jmeter.gui.GuiPackage.updateCurrentNode(GuiPackage.java:436)
at org.apache.jmeter.gui.GuiPackage.getCurrentGui(GuiPackage.java:272)
at org.apache.jmeter.gui.util.MenuFactory.addFileMenu(MenuFactory.java:224)
at org.apache.jmeter.threads.gui.AbstractThreadGroupGui.createPopupMenu(AbstractThreadGroupGui.java:82)
at org.apache.jmeter.gui.tree.JMeterTreeNode.createPopupMenu(JMeterTreeNode.java:158)
at org.apache.jmeter.gui.action.EditCommand.doAction(EditCommand.java:47)
at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:81)
at org.apache.jmeter.gui.action.ActionRouter.access$000(ActionRouter.java:40)
at org.apache.jmeter.gui.action.ActionRouter$1.run(ActionRouter.java:63)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

1 个答案:

答案 0 :(得分:0)

这意味着您的LoadRatio变量未定义。