NonGUIDriver java.lang.NullPointerException Maven Eclipse中的错



我在通过 mvn 运行 jmeter 测试脚本时出现和错误。

这是我的绒球.xml

<build>
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>2.2.0</version>
<executions>
<execution>
<id>jmeter-tests</id>
<phase>verify</phase>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
</executions>
<configuration>
<jmeterExtensions>
<artifact>kg.apc:jmeter-plugins:pom:1.3.1</artifact>
</jmeterExtensions>
<jmeterExtensions>
<artifact>kg.apc:jmeter-plugins-manager:jar:0.10</artifact>
</jmeterExtensions>
<jmeterExtensions>
<artifact>kg.apc:jmeter-plugins-json:jar:2.3</artifact>
</jmeterExtensions>
<junitLibraries>
<artifact>com.lazerycode.junit:junit-test:1.0.0</artifact>
</junitLibraries>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
</dependencies>

Jmeter日志文件:

2017/08/17 16:57:42 错误 - jmeter.save.SaveService: 转换错误 com.thoughtworks.xstream.converters.ConversionException: com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor

: com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor ---- 调试信息---- message : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException cause-message : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor 类 : org.apache.jorphan.collections.ListedHashTree 必需类型 : org.apache.jorphan.collections.ListedHashTree path :/jmeterTestPlan/hashTree/hashTree/hashTree[2]/hashTree/hashTree/com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor 行号 : 76

我尝试了所有方法,但仍然没有成功。

这是我收到的错误的控制台输出

[错误] 无法在项目 jmeter-demo 上执行目标 com.lazerycode.jmeter:jmeter-maven-plugin:2.2.0:配置 (配置( jmeter-demo: 找不到工件 commons-math3:commons-math3:jar:3.4.1 在中央 (https://repo.maven.apache.org/maven2( -> [帮助 1]

您需要将以下行添加到pom.xml文件的jmeterExtensions部分:

<artifact>kg.apc:jmeter-plugins-json:pom:2.6</artifact>

您收到的错误是关于缺少JSON路径提取器,该提取器位于jmeter-plugins-json Maven工件中

更多信息:

  • 向类路径添加其他库
  • 在不使用JMeter GUI的情况下启动JMeter测试的五种方法

最新更新