Ibtissam
Ibtissam

Reputation: 589

Cucumber Report Missing report result - report was not successfully completed

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

for information i have about 15 feature with +2000 steps

Upvotes: 3

Views: 9839

Answers (1)

It can be for several reasons.

  1. verify your pipeline, in the jenkinsfile, it is necessary when using the Cucumber Options indicate the path of the features
  stage 'Run Test'
         script 
            {sh "mvn clean test -Dcucumber.options=\"src/test/resources/features/ --tags @YourTagName\""}
  1. Verify plugin to use cucumber report in your JenkinsFile always put that inside "Finally"
      finally {
                           cucumber buildStatus: "UNSTABLE", 
                           fileIncludePattern: "**/cucumber.json",
                           jsonReportDirectory: 'target'
                            }

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 {

}

Upvotes: 0

Related Questions