【发布时间】:2017-05-07 05:42:09
【问题描述】:
我正在尝试使用 maven、surefire 和 jenkins 运行 SoapUI xml 项目文件。 对于 maven 和 jenkins 来说一切都很好,构建完成后,Junit 报告会显示在 jenkins 中(带有非常基本的信息 - 测试用例名称和状态)
我想使用 surefire 来显示报告和日志(我可以在 target/surfire-report/ 中看到日志文件的所有 *.xml 和 *.txt)。 如何配置jenkins显示surefire报告和日志文件?
这是我的 pom.xml 文件
<pluginRepositories>
<pluginRepository>
<id>smartbear-sweden-plugin-repository</id>
<url>http://www.soapui.org/repository/maven2/</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-maven-plugin</artifactId>
<version>5.3.0</version>
<configuration>
<projectFile>${basedir}/src/test/java/Test-API-soapui-project.xml</projectFile>
<outputFolder>${basedir}/target/surefire-reports/</outputFolder>
<junitReport>true</junitReport>
<exportwAll>true</exportwAll>
<printReport>true</printReport>
</configuration>
<executions>
<execution>
<id>soapUI</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui</artifactId>
<version>5.3.0</version>
<exclusions>
<exclusion>
<groupId>javafx</groupId>
<artifactId>jfxrt</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.20</version>
</plugin>
</plugins>
</build>
【问题讨论】:
标签: java maven jenkins maven-surefire-plugin