背景信息:
我有一个maven java项目。我有黄瓜测试和maven-cucumber-reporting插件正在运行并为该项目工作。
以下是我如何运行Cucumber测试:
package com.util.test;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
import org.junit.runner.RunWith;
@RunWith(Cucumber.class)
@CucumberOptions(strict = false, features = "src/test/resources/features", format = {"pretty", "json:src/test/report/cucumber.json"}, tags={"@test, @util"})
public class UtilCucumberTest {
}
这是我的pom与maven-cucumber报告插件:
<plugin>
<groupId>net.masterthought</groupId>
<artifactId>maven-cucumber-reporting</artifactId>
<version>${cucumber.reporting.version}</version>
<executions>
<execution>
<id>testing</id>
<phase>test</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<projectName>${project.artifactId}</projectName>
<outputDirectory>${project.basedir}/src/test/report/cucumber-reports</outputDirectory>
<cucumberOutput>${project.basedir}/src/test/report/cucumber.json</cucumberOutput>
<skippedFails>true</skippedFails>
<enableFlashCharts>false</enableFlashCharts>
<buildNumber>${project.version}</buildNumber>
</configuration>
</execution>
</executions>
</plugin>
每次运行构建时,cuc.json文件都会被覆盖,我丢失了以前的构建信息。我想保留每个报告的副本(或每个构建一个,如--report.json)。我目前还没有看到趋势页面,并希望看到此信息。
问题: