我正在使用Jenkins管道作业(Jenkinsfile)执行黄瓜测试。但是对于每个工作,它都会覆盖target / surefire-reports文件夹中的现有测试结果。
我想显示每个工作的所有黄瓜测试结果。
答案 0 :(得分:1)
您应该在报告文件夹名称中添加时间戳。请尝试以下代码。
<properties>
<timestamp>${maven.build.timestamp}</timestamp>
<maven.build.timestamp.format>yyyy_MM_dd_HH_mm</maven.build.timestamp.format>
<properties>
<plugin>
<groupId>net.masterthought</groupId>
<artifactId>maven-cucumber-reporting</artifactId>
<version>${masterThougth.version}</version>
<executions>
<execution>
<id>execution</id>
<phase>verify</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<checkBuildResult>false</checkBuildResult>
<projectName>${project.artifactId}</projectName>
<buildNumber>${project.build}</buildNumber>
<parallelTesting>true</parallelTesting>
<outputDirectory>target/cucumber-report/${timestamp}</outputDirectory>
<cucumberOutput>target/cucumber-report/</cucumberOutput>
</configuration>
</execution>
</executions>
</plugin>
答案 1 :(得分:0)