2018-01-22 22:46:30,987 INFO o.a.j.e.StandardJMeterEngine:所有线程组均已启动 2018-01-22 22:46:30,987 INFO o.a.j.t.JMeterThread:线程已启动:线程组1-1 2018-01-22 22:46:38,487 INFO o.a.j.m.JSR223PreProcessor:count is 3 2018-01-22 22:46:40,316 ERROR o.a.j.m.JSR223PreProcessor:JSR223脚本中的问题,JSR223 PreProcessor javax.script.ScriptException:groovy.lang.MissingPropertyException:没有这样的属性:类的Count:Script19 在org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:320)〜[groovy-all-2.4.12.jar:2.4.12] 在org.codehaus.groovy.jsr223.GroovyCompiledScript.eval(GroovyCompiledScript.java:72)〜[groovy-all-2.4.12.jar:2.4.12] 在javax.script.CompiledScript.eval(未知来源)〜[?:1.8.0_151] at org.apache.jmeter.util.JSR223TestElement.processFileOrScript(JSR223TestElement.java:220)〜[ApacheJMeter_core.jar:3.3 r1808647] 在org.apache.jmeter.modifiers.JSR223PreProcessor.process(JSR223PreProcessor.java:42)[ApacheJMeter_components.jar:3.3 r1808647] at org.apache.jmeter.threads.JMeterThread.runPreProcessors(JMeterThread.java:843)[ApacheJMeter_core.jar:3.3 r1808647] 在org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:475)[ApacheJMeter_core.jar:3.3 r1808647] at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:424)[ApacheJMeter_core.jar:3.3 r1808647] at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:255)[ApacheJMeter_core.jar:3.3 r1808647] 在java.lang.Thread.run(未知来源)[?:1.8.0_151]
答案 0 :(得分:0)
最有可能的错误与之前的一个执行有关,因为我在代码中的任何地方都没有看到Count
属性引用。按" Ctrl + E"清洁日志窗口键组合并重新运行您的测试。
另外请确保勾选Cache compiled script if available
框,这样Groovy代码的执行速度会更快。
参考文献: