我遇到了一个无法生成黄瓜报告的问题。我在用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插件成功地运行了它,有失败的也有没有的(我知道有些问题是当有失败的时候报告不会生成)。但在这两种情况下,都不会在我的目标文件夹中创建任何报告。
有什么想法?
发布于 2020-02-11 11:26:49
我最终通过升级到5.1.3解决了我的问题,它们在那里生成得很好。
发布于 2021-04-08 00:53:22
在所有最新的jenkins版本中都会出现"ERROR: Build step failed with exception when using Cucumber Reports“来解决此问题
在jenkins中添加构建后操作来添加cucumber报告选项时,不需要提供JSON报告路径/位置,只需将File Include模式添加为**/cucumber.json.enter image description here
这将解决该问题,并将生成黄瓜报告。
https://stackoverflow.com/questions/58804330
复制相似问题