未生成黄瓜报告

我遇到了无法生成黄瓜报告的问题。我正在使用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类,其内容如下:

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插件运行了它,有故障也没有故障(我知道有些问题是当出现故障时报告不会生成)。但是无论哪种情况,都不会在我的目标文件夹中创建任何报告。

有想法吗?

niksosf 回答:未生成黄瓜报告

我最终通过升级到5.1.3解决了我的问题,并且在那里产生了很好的结果。

,

“ERROR: Build step failed with exception when using Cucumber Reports”出现在所有最新的 jenkins 版本中以解决这个问题

在 jenkins 中添加构建后操作以添加黄瓜报告选项时,无需提供 JSON 报告路径/位置,而只需将文件包含模式添加为 **/cucumber.json。enter image description here

这将解决问题并生成 Cucumber 报告。

本文链接:https://www.f2er.com/3123102.html

大家都在问