黄瓜报告未生成
Cucumber reports not generating
我遇到了无法生成黄瓜报告的问题。我正在 运行使用 IntelliJ 进行测试。
这是我的 pom:
<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-java -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>4.8.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-junit -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>4.8.0</version>
<scope>test</scope>
</dependency>
我创建了一个 RunCucumberTest.java class,具有以下内容:
import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
import org.junit.runner.RunWith;
@RunWith(Cucumber.class)
@CucumberOptions(plugin = {"pretty", "html:target/reports", "json:target/reports/cucumber.json"},
glue = {"com.PACKAGE.featureTests"})
public class RunCucumberTest {
}
我已经 运行 使用 IntelliJ 插件成功完成,有失败也有没有(我知道有些问题是在失败时不会生成报告)。但是在这两种情况下都不会在我的目标文件夹中创建任何报告。
想法?
我终于通过升级到 5.1.3 解决了我的问题,它们在那里生成很好。
所有最新的 jenkins 版本都会出现“错误:使用 Cucumber Reports 时构建步骤失败并出现异常”以解决此问题
虽然添加 post-build 操作以在 jenkins 中添加黄瓜报告选项,但无需提供 JSON 报告 Path/Location 而只需将文件包含模式添加为 **/cucumber.json.enter image description here
这将解决问题并生成 Cucumber 报告。
我遇到了无法生成黄瓜报告的问题。我正在 运行使用 IntelliJ 进行测试。
这是我的 pom:
<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-java -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>4.8.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-junit -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>4.8.0</version>
<scope>test</scope>
</dependency>
我创建了一个 RunCucumberTest.java class,具有以下内容:
import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
import org.junit.runner.RunWith;
@RunWith(Cucumber.class)
@CucumberOptions(plugin = {"pretty", "html:target/reports", "json:target/reports/cucumber.json"},
glue = {"com.PACKAGE.featureTests"})
public class RunCucumberTest {
}
我已经 运行 使用 IntelliJ 插件成功完成,有失败也有没有(我知道有些问题是在失败时不会生成报告)。但是在这两种情况下都不会在我的目标文件夹中创建任何报告。
想法?
我终于通过升级到 5.1.3 解决了我的问题,它们在那里生成很好。
所有最新的 jenkins 版本都会出现“错误:使用 Cucumber Reports 时构建步骤失败并出现异常”以解决此问题
虽然添加 post-build 操作以在 jenkins 中添加黄瓜报告选项,但无需提供 JSON 报告 Path/Location 而只需将文件包含模式添加为 **/cucumber.json.enter image description here
这将解决问题并生成 Cucumber 报告。