我将完整的Jmeter文件夹从一台机器复制到另一台机器并尝试运行。卡住了错误 - ArrayIndexOutOfBoundsException:0。请帮忙
INFO - jmeter.gui.util.MenuFactory:跳过 org.apache.jmeter.assertions.BSFAssertion INFO - jmeter.gui.util.MenuFactory:正在跳过org.apache.jmeter.extractor.BSFPostProcessor INFO - jmeter.gui.util.MenuFactory:正在跳过org.apache.jmeter.modifiers.BSFPreProcessor INFO - jmeter.protocol.http.sampler.HTTPSamplerBase:text / html的解析器是 org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser INFO - jmeter.protocol.http.sampler.HTTPSamplerBase:application / xhtml + xml的解析器是 org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser INFO - jmeter.protocol.http.sampler.HTTPSamplerBase:application / xml的解析器是 org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser INFO - jmeter.protocol.http.sampler.HTTPSamplerBase:text / xml的解析器是 org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser INFO - jmeter.protocol.http.sampler.HTTPSamplerBase:text / vnd.wap.wml的解析器是 org.apache.jmeter.protocol.http.parser.RegexpHTMLParser INFO - jmeter.protocol.http.sampler.HTTPSamplerBase:text / css的解析器是org.apache.jmeter.protocol.http.parser.CssParser INFO - jorphan.exec.KeyToolUtils:在keytool'中找到的keytool INFO - jmeter.protocol.http.proxy.ProxyControl:HTTP(S)测试脚本记录器SSL代理将使用支持嵌入式3rd的密钥 文件中的聚会资源 G:\官方\ JMeter的\ Apache的JMeter的-3.1 \ BIN \ proxyserver.jks INFO - jmeter.gui.util.MenuFactory:正在跳过org.apache.jmeter.protocol.java.sampler.BSFSampler INFO - jmeter.gui.util.MenuFactory:正在跳过org.apache.jmeter.protocol.mongodb.config.MongoSourceElement INFO - jmeter.gui.util.MenuFactory:正在跳过org.apache.jmeter.protocol.mongodb.sampler.MongoScriptSampler INFO - jmeter.gui.util.MenuFactory:正在跳过org.apache.jmeter.timers.BSFTimer INFO - jmeter.gui.util.MenuFactory:正在跳过org.apache.jmeter.visualizers.BSFListener INFO - jmeter.gui.util.MenuFactory:正在跳过org.apache.jmeter.visualizers.MonitorHealthVisualizer INFO - jmeter.samplers.SampleResult:注意:示例TimeStamps是START时间 INFO - jmeter.samplers.SampleResult:sampleresult.default.encoding设置为ISO-8859-1 INFO - jmeter.samplers.SampleResult:sampleresult.useNanoTime = true INFO - jmeter.samplers.SampleResult:sampleresult.nanoThreadSleep = 5000 INFO - jmeter.services.FileServer:默认base =' G:\ official \ JMeter \ apache-jmeter-3.1 \ bin' INFO - jmeter.gui.action.Load:加载文件:G:\ official \ JMeter \ apache-jmeter-3.1 \ bin \ Cafyne_3.0.jmx INFO - jmeter.services.FileServer:设置新的基数=' G:\ official \ JMeter \ apache-jmeter-3.1 \ bin' INFO - jmeter.save.SaveService:Testplan(JMX)版本:2.2。 Testlog(JTL)版本:2.2 INFO - jmeter.save.SaveService:使用编码UTF-8的SaveService属性文件 INFO - jmeter.save.SaveService:使用SaveService属性3.1版 INFO - jmeter.save.SaveService:所有转换器版本都存在且正确 INFO - jmeter.save.SaveService:加载文件:G:\ official \ JMeter \ apache-jmeter-3.1 \ bin \ Cafyne_3.0.jmx INFO - jmeter.protocol.http.control.CookieManager:设置:删除null:true检查:true允许变量:true保存:false前缀: 曲奇饼_ INFO - jmeter.services.FileServer:设置新的基数=' G:\ official \ JMeter \ apache-jmeter-3.1 \ bin' 错误 - jmeter.gui.action.ActionRouter:处理错误org.apache.jmeter.gui.action.Start@71687585 java.lang.ArrayIndexOutOfBoundsException:0 在org.apache.jmeter.gui.action.Start.startEngine(Start.java:193)org.apache.jmeter.gui.action.Start.startEngine(Start.java:174)at org.apache.jmeter.gui.action.Start.startEngine(Start.java:164)at org.apache.jmeter.gui.action.Start.doAction(Start.java:108)at at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:80) 在 org.apache.jmeter.gui.action.ActionRouter.access $ 000(ActionRouter.java:40) 在 org.apache.jmeter.gui.action.ActionRouter $ 1.run(ActionRouter.java:62) 在java.awt.event.InvocationEvent.dispatch(未知来源)at java.awt.EventQueue.dispatchEventImpl(未知来源)at java.awt.EventQueue.access $ 500(未知来源)at java.awt.EventQueue $ 3.run(未知来源)at java.awt.EventQueue $ 3.run(未知来源)at java.security.AccessController.doPrivileged(Native Method)at java.security.ProtectionDomain $ JavaSecurityAccessImpl.doIntersectionPrivilege(未知 来自)java.awt.EventQueue.dispatchEvent(未知来源)at java.awt.EventDispatchThread.pumpOneEventForFilters(未知来源) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) 在java.awt.EventDispatchThread.pumpEventsForHierarchy(未知 来自java.awt.EventDispatchThread.pumpEvents(未知来源) at java.awt.EventDispatchThread.pumpEvents(Unknown Source)at java.awt.EventDispatchThread.run(未知来源)
答案 0 :(得分:11)
我知道这个问题已经过时了,但是我遇到了同样的问题并没有找到解决办法。然后我分析了JMeter的源代码,我把这个解决方案留给了其他人。
在我创建测试计划的情况下,默认情况下它已被禁用。
启用测试计划后(右键单击 - >启用),它开始工作了!
答案 1 :(得分:0)
代码是:(在testTree.getArray()[0]中失败)
HashTree testTree = gui.getTreeModel().getTestPlan();
JMeter.convertSubTree(testTree);
if(threadGroupsToRun != null && threadGroupsToRun.length>0) {
removeThreadGroupsFromHashTree(testTree, threadGroupsToRun);
}
testTree.add(testTree.getArray()[0], gui.getMainFrame());
似乎测试计划是空的。
你可以检查G:\ official \ JMeter \ apache-jmeter-3.1 \ bin \ Cafyne_3.0.jmx
也许文件没有被复制好