黄瓜报告缺少报告结果-报告未成功完成 [英] Cucumber Report Missing report result - report was not successfully completed
本文介绍了黄瓜报告缺少报告结果-报告未成功完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用Cucumber Reports插件在管道作业中获取黄瓜报告,它以前可以正常工作,但是现在出现此错误:
I use Cucumber Reports plugin to get cucumber reports in pipeline jobs it works fine before but now i have this error:
[CucumberReport] Preparing Cucumber Reports
[CucumberReport] JSON report directory is "target/"
[CucumberReport] Copied 1 json files from workspace "c:/jenkins/workspace/..." to reports directory "/var/jenkins_home/jobs/..."
[CucumberReport] Copied 0 properties files from workspace "c:/jenkins/workspace/..." to reports directory "/var/jenkins_home/jobs/..."
[CucumberReport] Processing 1 json files:
[CucumberReport] /var/jenkins_home/jobs/.../cucumber.json
[CucumberReport] Missing report result - report was not successfully completed
[CucumberReport] Build status is left unchanged
如果我仅运行报告生成的某些功能而没有任何问题,则只有运行所有功能时才会出现此问题
And if i run only some features the reports generate without any issue, i have this issue only if i run all features
有关信息,我具有+2000步长的15个功能
for information i have about 15 feature with +2000 steps
推荐答案
可能有多种原因.
- 在jenkins文件中验证管道,使用黄瓜选项指示功能路径时很有必要
stage 'Run Test'
script
{sh "mvn clean test -Dcucumber.options=\"src/test/resources/features/ --tags @YourTagName\""}
- 验证插件以在您的JenkinsFile中使用黄瓜报告始终将其放在最后"之内
finally {
cucumber buildStatus: "UNSTABLE",
fileIncludePattern: "**/cucumber.json",
jsonReportDirectory: 'target'
}
RunTest.java示例
Example RunTest.java
package runner;
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
@CucumberOptions(plugin = { "pretty", "json:target/cucumber.json" }, features = {
"src/test/resources/features/" }, glue = { "classpath:" }, tags = { "@YourTagName" })
public class RunTest {
}
这篇关于黄瓜报告缺少报告结果-报告未成功完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文