我使用Cucumber Reports插件在管道作业中获取黄瓜报告它之前工作正常,但现在我有这个错误:
[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
如果我只运行报告生成的某些功能而没有任何问题,我只有在运行所有功能时才会遇到此问题
获取信息我有大约15个功能+2000步骤
答案 0 :(得分:0)
可能有几种原因。
stage 'Run Test'
script
{sh "mvn clean test -Dcucumber.options=\"src/test/resources/features/ --tags @YourTagName\""}
finally {
cucumber buildStatus: "UNSTABLE",
fileIncludePattern: "**/cucumber.json",
jsonReportDirectory: 'target'
}
示例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 {
}