打开脚本时的jmeter错误

时间:2013-02-21 20:02:25

标签: jmeter

好的 - 我没有将这个测试从一台机器移到另一台机器上。此测试已创建并保存在我今天尝试打开的位置。昨天 - 我做了一些改变并保存了它。现在,我去打开,我得到错误 - 请参阅日志文件。

我一直在寻找答案,但我发现的唯一一件事就是将测试从一台机器移到另一台机器上。这看起来很简单。两个问题 - 1.以前任何人都看过这个问题并知道是什么造成的吗? 我搞砸了吗?我是否必须完全重做此测试?

在这种情况下不确定这是否重要,但是:
Windows 7的 Jmeter 2.9

以下是日志信息:

2013/02/21 14:54:53 INFO  - jmeter.gui.action.Load: Loading file: C:\Users\jcraig\Desktop\Tools\jmeter\apache-jmeter-2.9\apache-jmeter-2.9\bin\MC_multi_thread.jmx 
2013/02/21 14:54:53 INFO  - jmeter.services.FileServer: Set new base='C:\Users\jcraig\Desktop\Tools\jmeter\apache-jmeter-2.9\apache-jmeter-2.9\bin' 
2013/02/21 14:54:53 INFO  - jmeter.services.FileServer: Set new base='C:\Users\jcraig\Desktop\Tools\jmeter\apache-jmeter-2.9\apache-jmeter-2.9\bin' 
2013/02/21 14:55:40 INFO  - jmeter.gui.action.Load: Loading file: C:\Users\jcraig\Desktop\Tools\jmeter\apache-jmeter-2.9\apache-jmeter-2.9\bin\MC_Multi_Thread02.jmx 
2013/02/21 14:55:40 INFO  - jmeter.services.FileServer: Set new base='C:\Users\jcraig\Desktop\Tools\jmeter\apache-jmeter-2.9\apache-jmeter-2.9\bin' 
2013/02/21 14:55:40 ERROR - jmeter.save.SaveService: Conversion error com.thoughtworks.xstream.converters.ConversionException:  : no more data available - expected end tags </stringProp></HTTPSamplerProxy></hashTree></hashTree></hashTree></hashTree></jmeterTestPlan> to close start tag <stringProp> from line 7281 and start tag <HTTPSamplerProxy> from line 7257 and start tag <hashTree> from line 6253 and start tag <hashTree> from line 6191 and start tag <hashTree> from line 13 and start tag <hashTree> from line 3 and start tag <jmeterTestPlan> from line 2, parser stopped on TEXT seen ...</stringProp>\n            <stringProp... @7282:24 :  : no more data available - expected end tags </stringProp></HTTPSamplerProxy></hashTree></hashTree></hashTree></hashTree></jmeterTestPlan> to close start tag <stringProp> from line 7281 and start tag <HTTPSamplerProxy> from line 7257 and start tag <hashTree> from line 6253 and start tag <hashTree> from line 6191 and start tag <hashTree> from line 13 and start tag <hashTree> from line 3 and start tag <jmeterTestPlan> from line 2, parser stopped on TEXT seen ...</stringProp>\n            <stringProp... @7282:24
---- Debugging information ----
message             :  : no more data available - expected end tags </stringProp></HTTPSamplerProxy></hashTree></hashTree></hashTree></hashTree></jmeterTestPlan> to close start tag <stringProp> from line 7281 and start tag <HTTPSamplerProxy> from line 7257 and start tag <hashTree> from line 6253 and start tag <hashTree> from line 6191 and start tag <hashTree> from line 13 and start tag <hashTree> from line 3 and start tag <jmeterTestPlan> from line 2, parser stopped on TEXT seen ...</stringProp>\n            <stringProp... @7282:24
cause-exception     : com.thoughtworks.xstream.io.StreamException
cause-message       :  : no more data available - expected end tags </stringProp></HTTPSamplerProxy></hashTree></hashTree></hashTree></hashTree></jmeterTestPlan> to close start tag <stringProp> from line 7281 and start tag <HTTPSamplerProxy> from line 7257 and start tag <hashTree> from line 6253 and start tag <hashTree> from line 6191 and start tag <hashTree> from line 13 and start tag <hashTree> from line 3 and start tag <jmeterTestPlan> from line 2, parser stopped on TEXT seen ...</stringProp>\n            <stringProp... @7282:24
class               : org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy
required-type       : org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy
converter-type      : org.apache.jmeter.protocol.http.sampler.HTTPSamplerBaseConverter
path                : /jmeterTestPlan/hashTree/hashTree/hashTree[5]/hashTree[4]/HTTPSamplerProxy[16]
line number         : 7282
class[1]            : org.apache.jorphan.collections.ListedHashTree
converter-type[1]   : org.apache.jmeter.save.converters.HashTreeConverter
------------------------------- :  : no more data available - expected end tags </stringProp></HTTPSamplerProxy></hashTree></hashTree></hashTree></hashTree></jmeterTestPlan> to close start tag <stringProp> from line 7281 and start tag <HTTPSamplerProxy> from line 7257 and start tag <hashTree> from line 6253 and start tag <hashTree> from line 6191 and start tag <hashTree> from line 13 and start tag <hashTree> from line 3 and start tag <jmeterTestPlan> from line 2, parser stopped on TEXT seen ...</stringProp>\n            <stringProp... @7282:24 :  : no more data available - expected end tags </stringProp></HTTPSamplerProxy></hashTree></hashTree></hashTree></hashTree></jmeterTestPlan> to close start tag <stringProp> from line 7281 and start tag <HTTPSamplerProxy> from line 7257 and start tag <hashTree> from line 6253 and start tag <hashTree> from line 6191 and start tag <hashTree> from line 13 and start tag <hashTree> from line 3 and start tag <jmeterTestPlan> from line 2, parser stopped on TEXT seen ...</stringProp>\n            <stringProp... @7282:24
---- Debugging information ----
message             :  : no more data available - expected end tags </stringProp></HTTPSamplerProxy></hashTree></hashTree></hashTree></hashTree></jmeterTestPlan> to close start tag <stringProp> from line 7281 and start tag <HTTPSamplerProxy> from line 7257 and start tag <hashTree> from line 6253 and start tag <hashTree> from line 6191 and start tag <hashTree> from line 13 and start tag <hashTree> from line 3 and start tag <jmeterTestPlan> from line 2, parser stopped on TEXT seen ...</stringProp>\n            <stringProp... @7282:24
cause-exception     : com.thoughtworks.xstream.io.StreamException
cause-message       :  : no more data available - expected end tags </stringProp></HTTPSamplerProxy></hashTree></hashTree></hashTree></hashTree></jmeterTestPlan> to close start tag <stringProp> from line 7281 and start tag <HTTPSamplerProxy> from line 7257 and start tag <hashTree> from line 6253 and start tag <hashTree> from line 6191 and start tag <hashTree> from line 13 and start tag <hashTree> from line 3 and start tag <jmeterTestPlan> from line 2, parser stopped on TEXT seen ...</stringProp>\n            <stringProp... @7282:24
class               : org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy
required-type       : org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy
converter-type      : org.apache.jmeter.protocol.http.sampler.HTTPSamplerBaseConverter
path                : /jmeterTestPlan/hashTree/hashTree/hashTree[5]/hashTree[4]/HTTPSamplerProxy[16]
line number         : 7282
class[1]            : org.apache.jorphan.collections.ListedHashTree
converter-type[1]   : org.apache.jmeter.save.converters.HashTreeConverter
-------------------------------
message             :  : no more data available - expected end tags </stringProp></HTTPSamplerProxy></hashTree></hashTree></hashTree></hashTree></jmeterTestPlan> to close start tag <stringProp> from line 7281 and start tag <HTTPSamplerProxy> from line 7257 and start tag <hashTree> from line 6253 and start tag <hashTree> from line 6191 and start tag <hashTree> from line 13 and start tag <hashTree> from line 3 and start tag <jmeterTestPlan> from line 2, parser stopped on TEXT seen ...</stringProp>\n            <stringProp... @7282:24 :  : no more data available - expected end tags </stringProp></HTTPSamplerProxy></hashTree></hashTree></hashTree></hashTree></jmeterTestPlan> to close start tag <stringProp> from line 7281 and start tag <HTTPSamplerProxy> from line 7257 and start tag <hashTree> from line 6253 and start tag <hashTree> from line 6191 and start tag <hashTree> from line 13 and start tag <hashTree> from line 3 and start tag <jmeterTestPlan> from line 2, parser stopped on TEXT seen ...</stringProp>\n            <stringProp... @7282:24
---- Debugging information ----
message             :  : no more data available - expected end tags </stringProp></HTTPSamplerProxy></hashTree></hashTree></hashTree></hashTree></jmeterTestPlan> to close start tag <stringProp> from line 7281 and start tag <HTTPSamplerProxy> from line 7257 and start tag <hashTree> from line 6253 and start tag <hashTree> from line 6191 and start tag <hashTree> from line 13 and start tag <hashTree> from line 3 and start tag <jmeterTestPlan> from line 2, parser stopped on TEXT seen ...</stringProp>\n            <stringProp... @7282:24
cause-exception     : com.thoughtworks.xstream.io.StreamException
cause-message       :  : no more data available - expected end tags </stringProp></HTTPSamplerProxy></hashTree></hashTree></hashTree></hashTree></jmeterTestPlan> to close start tag <stringProp> from line 7281 and start tag <HTTPSamplerProxy> from line 7257 and start tag <hashTree> from line 6253 and start tag <hashTree> from line 6191 and start tag <hashTree> from line 13 and start tag <hashTree> from line 3 and start tag <jmeterTestPlan> from line 2, parser stopped on TEXT seen ...</stringProp>\n            <stringProp... @7282:24
class               : org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy
required-type       : org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy
converter-type      : org.apache.jmeter.protocol.http.sampler.HTTPSamplerBaseConverter
path                : /jmeterTestPlan/hashTree/hashTree/hashTree[5]/hashTree[4]/HTTPSamplerProxy[16]
line number         : 7282
class[1]            : org.apache.jorphan.collections.ListedHashTree
converter-type[1]   : org.apache.jmeter.save.converters.HashTreeConverter
-------------------------------
cause-exception     : com.thoughtworks.xstream.converters.ConversionException
cause-message       :  : no more data available - expected end tags </stringProp></HTTPSamplerProxy></hashTree></hashTree></hashTree></hashTree></jmeterTestPlan> to close start tag <stringProp> from line 7281 and start tag <HTTPSamplerProxy> from line 7257 and start tag <hashTree> from line 6253 and start tag <hashTree> from line 6191 and start tag <hashTree> from line 13 and start tag <hashTree> from line 3 and start tag <jmeterTestPlan> from line 2, parser stopped on TEXT seen ...</stringProp>\n            <stringProp... @7282:24 :  : no more data available - expected end tags </stringProp></HTTPSamplerProxy></hashTree></hashTree></hashTree></hashTree></jmeterTestPlan> to close start tag <stringProp> from line 7281 and start tag <HTTPSamplerProxy> from line 7257 and start tag <hashTree> from line 6253 and start tag <hashTree> from line 6191 and start tag <hashTree> from line 13 and start tag <hashTree> from line 3 and start tag <jmeterTestPlan> from line 2, parser stopped on TEXT seen ...</stringProp>\n            <stringProp... @7282:24
first-jmeter-class  : org.apache.jmeter.save.converters.HashTreeConverter.unmarshal(HashTreeConverter.java:65)
class               : org.apache.jmeter.save.ScriptWrapper
required-type       : org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy
converter-type      : org.apache.jmeter.save.ScriptWrapperConverter
path                : /jmeterTestPlan/hashTree/hashTree/hashTree[5]/hashTree[4]/HTTPSamplerProxy[16]
line number         : 7282
version             : 2.9 r1437961
------------------------------- 
2013/02/21 14:55:40 WARN  - jmeter.gui.action.Load: Unexpected error java.lang.Exception: Error in TestPlan - see log file
    at org.apache.jmeter.gui.action.Load.insertLoadedTree(Load.java:158)
    at org.apache.jmeter.gui.action.Load.loadProjectFile(Load.java:113)
    at org.apache.jmeter.gui.action.LoadRecentProject.doAction(LoadRecentProject.java:68)
    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:251)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)
    at java.awt.EventQueue.access$000(EventQueue.java:101)
    at java.awt.EventQueue$3.run(EventQueue.java:666)
    at java.awt.EventQueue$3.run(EventQueue.java:664)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:675)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

感谢您的任何信息!

杰米

6 个答案:

答案 0 :(得分:4)

这是一种绑定损坏的测试jmx文件的快捷方法。

  1. 转到您的jmeter目录并打开jmeter.log文件
  2. 最新的行显示记录的最后一个错误jmeter,你必须找到这样的一个块:

    ----调试信息---- 消息:com.atlantbh.jmeter.plugins.rest.RestSampler cause-exception:com.thoughtworks.xstream.mapper.CannotResolveClassException cause-message:com.atlantbh.jmeter.plugins.rest.RestSampler class:org.apache.jorphan.collections.ListedHashTree required-type:org.apache.jorphan.collections.ListedHashTree converter-type:org.apache.jmeter.save.converters.HashTreeConverter 路径:/jmeterTestPlan/hashTree/hashTree/hashTree[3]/hashTree[3]/com.atlantbh.jmeter.plugins.rest.RestSampler 行号:950

  3. 使用文本编辑器打开jmx损坏的文件,找到损坏的代码行(在上面的例子中,损坏的行是950)

  4. 将整个代码从<tag.name>移除到</tag.name>(或者,如果您熟练,请尝试浏览子代码,找到错误并进行修复)
  5. 使用其他名称保存已编辑的文件
  6. 加载到jmeter
  7. 如果错误仍然存​​在,请从步骤1开始重复(您将找到要删除的新标记)

答案 1 :(得分:2)

我们在尝试使用JMeter 2.13打开测试时遇到了类似的问题。通过添加一些JMeter插件解决了这个问题。

在我们的例子中,我们需要在lib / ext文件夹中添加'JMeterPlugins-Standard'jar,以便在测试中使用Entry(OR kg.apc.jmeter.vizualizers.ResponseTimesOverTimeGui)。

我们还需要在lib / junit文件夹中添加kg.apc.jmeter.vizualizers.CorrectedResultCollector jar用于jmeter-plugins-1.0.0(OR com.atlantbh.jmeter.plugins.rest.gui.RestGui)用法。

在这种情况下,您需要在测试中查找7282行以查看缺少的内容并为其添加相关插件。

由于某些原因,这些jar文件不包含在默认的jmeter下载中。

希望有所帮助。

答案 2 :(得分:1)

您的档案似乎已损坏。

尝试在xml编辑器中打开它以查看它是否正确。

检查磁盘空间或磁盘问题。你在保存期间遇到了崩溃吗?

您可以尝试手动添加标记结尾以获取部分标记,也许您需要删除最后一个xml节点。

答案 3 :(得分:1)

请按照以下步骤操作

  1. 转到以下链接 https://jmeter-plugins.org/downloads/all/ 并将插件管理器添加到您的Jmeter

  2. 重新启动Jmeter

  3. 点击&#34;选项 - &gt;添加所需的插件插件管理器&#34;
  4. 重新启动Jmeter
  5. 我认为它可以解决您的问题

答案 4 :(得分:0)

我有同样的情况,jmx不会加载。只有错误是不同的,我得到:java.lang.ArrayIndexOutOfBoundsException

通过安装Java SE 1.7.0.67

解决了这个问题

答案 5 :(得分:0)

请检查您的.jmx文件,可能会删除一些代码.... 我遇到了同样的问题...但在查看我的.jmx文件后,我看到我的团队成员删除了一些代码......