在通过mvn运行jmeter测试脚本时,我得到并出错了。
这是我的pom.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>计时器日志文件:
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 --调试信息--消息: com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor原因-异常: com.thoughtworks.xstream.mapper.CannotResolveClassException原因-消息: com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor类: org.apache.jorphan.collections.ListedHashTree必需-类型: org.apache.jorphan.collections.ListedHashTree路径:/jmeterTestPlan/hashTree/hashTree/hashTree 2/hashTree/hashTree/com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor线路号码: 76
我试了每一件事,但还是没有成功。
这是我得到的一个错误的控制台输出
错误未能在项目j会谈上执行目标com.lazerycode.jmeter:jmeter-maven-plugin:2.2.0:configure (配置)演示:无法在中心(https://repo.maven.apache.org/maven2) ->帮助1中找到工件共用-math3 3:commons 3:jar:3.4.1
发布于 2017-08-17 13:12:16
您需要将以下行添加到jmeterExtensions文件的pom.xml部分:
<artifact>kg.apc:jmeter-plugins-json:pom:2.6</artifact>您所得到的错误是关于缺少JSON路径抽取器,它存在于json plugins-json Maven伪影中
更多信息:
https://stackoverflow.com/questions/45734444
复制相似问题