【发布时间】:2015-09-17 17:23:06
【问题描述】:
我正在尝试将 Jmeter 测试与 maven 集成并从竹子中运行。我看到测试结果已通过(即使我在本地运行,也可以查看来自竹子的输出或相同的结果)但它没有提供更多详细信息,例如我的请求,回复 xml 类似于我从 Jmeter GUI 运行脚本时看到的内容在查看结果树下。我什至尝试使用分析插件,但仍然没有看到我的预期。 maven 中是否有一种方法(像任何插件一样)可以生成类似于我们在查看结果树中看到的详细报告? 任何帮助将不胜感激。
[info] Completed Test: Demo Test.jmx
16-Sep-2015 13:49:32 [INFO]
16-Sep-2015 13:49:32 [INFO] Test Results:
16-Sep-2015 13:49:32 [INFO]
16-Sep-2015 13:49:32 [INFO] Tests Run: 1, Failures: 0
这是我的 POM:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>jmeter-demo</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>jmeter-demo</name>
<url>http://maven.apache.org</url>
<build>
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>1.9.1</version>
<executions>
<execution>
<id>jmeter-tests</id>
<phase>verify</phase>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-analysis-Maven-plugin</artifactId>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>analyze</goal>
</goals>
<configuration>
<source>${project.build.directory}/**/*.jtl</source>
<targetDirectory>${project.build.directory}/testresults/</targetDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
提前致谢
【问题讨论】: