title: net.masterthought.cucumber.ValidationException: No report file was added - ERROR
body: <p>My Cucumber reports are not getting generated. I have created my small Spring Boot project and tried to create cucumber tests on it, i am able to load the application and run the cucumber tests on the same, but when i added plugins &amp; dependencies for the report generation, i am getting the error - net.masterthought.cucumber.ValidationException: No report file was added!</p>
  
  <p><strong>Please note: My cucumber tests are part of a Spring boot application, it loads the spring boot first before running the tests.</strong></p>
  
  <p>I have tried changing the versions of maven-cucumber-reporting, adding the tags of json files &amp; testFailureIgnore etc but nothing helped</p>
  
  <p><strong>My Runner Class:</strong></p>
  
  <pre><code>package BDD;
  import cucumber.api.CucumberOptions;
  import cucumber.api.junit.Cucumber;
  import org.junit.runner.RunWith;
  
  @RunWith(Cucumber.class)
  @CucumberOptions(features = "classpath:features",
          plugin = {"pretty",
                  "html:target/cucumber-reports","json:target/cucumber.json","junit:target/cucumber-reports/Cucumber.xml"},
          monochrome = true,
          strict=true        )
  
  
  public class CucumberTest {
  }
  </code></pre>
  
  <p>my pom.xml: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;com.sagar.springboot&lt;/groupId&gt;
      &lt;artifactId&gt;first-springboot-project&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  
      &lt;properties&gt;
          &lt;java.version&gt;1.8&lt;/java.version&gt;
      &lt;/properties&gt;
  
      &lt;parent&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
          &lt;version&gt;1.5.3.RELEASE&lt;/version&gt;
      &lt;/parent&gt;
  
      &lt;dependencies&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-jdbc&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;mysql&lt;/groupId&gt;
              &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.postgresql&lt;/groupId&gt;
              &lt;artifactId&gt;postgresql&lt;/artifactId&gt;
              &lt;version&gt;9.4-1206-jdbc42&lt;/version&gt;
          &lt;/dependency&gt;
  &lt;!--        &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;/artifactId&gt;
              &lt;version&gt;1.5.3.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;--&gt;
          &lt;!--&lt;dependency&gt;
              &lt;groupId&gt;org.apache.tomcat.embed&lt;/groupId&gt;
              &lt;artifactId&gt;tomcat-embed-core&lt;/artifactId&gt;
              &lt;version&gt;9.0.6&lt;/version&gt;
          &lt;/dependency&gt;--&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.h2database&lt;/groupId&gt;
              &lt;artifactId&gt;h2&lt;/artifactId&gt;
              &lt;version&gt;1.4.197&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.projectlombok&lt;/groupId&gt;
              &lt;artifactId&gt;lombok&lt;/artifactId&gt;
              &lt;version&gt;1.18.8&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
              &lt;version&gt;4.3.8.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Needed for CUCUMBER --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
              &lt;artifactId&gt;selenium-java&lt;/artifactId&gt;
              &lt;version&gt;3.11.0&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;info.cukes&lt;/groupId&gt;
              &lt;artifactId&gt;cucumber-java&lt;/artifactId&gt;
              &lt;version&gt;1.2.5&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;info.cukes&lt;/groupId&gt;
              &lt;artifactId&gt;cucumber-jvm-deps&lt;/artifactId&gt;
              &lt;version&gt;1.0.5&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;info.cukes&lt;/groupId&gt;
              &lt;artifactId&gt;cucumber-junit&lt;/artifactId&gt;
              &lt;version&gt;1.2.5&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.vimalselvam&lt;/groupId&gt;
              &lt;artifactId&gt;cucumber-extentsreport&lt;/artifactId&gt;
              &lt;version&gt;3.0.2&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.aventstack&lt;/groupId&gt;
              &lt;artifactId&gt;extentreports&lt;/artifactId&gt;
              &lt;version&gt;3.1.2&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.mashape.unirest&lt;/groupId&gt;
              &lt;artifactId&gt;unirest-java&lt;/artifactId&gt;
              &lt;version&gt;1.4.9&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.rest-assured&lt;/groupId&gt;
              &lt;artifactId&gt;rest-assured&lt;/artifactId&gt;
              &lt;version&gt;3.1.1&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.rest-assured&lt;/groupId&gt;
              &lt;artifactId&gt;rest-assured&lt;/artifactId&gt;
              &lt;version&gt;3.0.7&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.cucumber&lt;/groupId&gt;
              &lt;artifactId&gt;cucumber-spring&lt;/artifactId&gt;
              &lt;version&gt;4.3.1&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter&lt;/artifactId&gt;
          &lt;/dependency&gt;
         &lt;!--   &lt;dependency&gt;
              &lt;groupId&gt;org.testng&lt;/groupId&gt;
              &lt;artifactId&gt;testng&lt;/artifactId&gt;
              &lt;version&gt;6.14.3&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt; --&gt;
        &lt;!--  &lt;dependency&gt;
              &lt;groupId&gt;info.cukes&lt;/groupId&gt;
              &lt;artifactId&gt;cucumber-testng&lt;/artifactId&gt;
              &lt;version&gt;1.2.5&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt; --&gt;
          &lt;!--&lt;dependency&gt;
              &lt;groupId&gt;net.masterthought&lt;/groupId&gt;
              &lt;artifactId&gt;cucumber-reporting&lt;/artifactId&gt;
              &lt;version&gt;4.2.3&lt;/version&gt;
          &lt;/dependency&gt;--&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.fasterxml.jackson.dataformat&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-dataformat-xml&lt;/artifactId&gt;
              &lt;version&gt;2.9.7&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
              &lt;artifactId&gt;camel-core&lt;/artifactId&gt;
              &lt;version&gt;2.22.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.xml.bind&lt;/groupId&gt;
              &lt;artifactId&gt;jaxb-api&lt;/artifactId&gt;
              &lt;version&gt;2.4.0-b180830.0359&lt;/version&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.codehaus.groovy&lt;/groupId&gt;
              &lt;artifactId&gt;groovy-xml&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;dom4j&lt;/groupId&gt;
              &lt;artifactId&gt;dom4j&lt;/artifactId&gt;
              &lt;version&gt;1.6.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!--&lt;dependency&gt;
              &lt;groupId&gt;dom4j&lt;/groupId&gt;
              &lt;artifactId&gt;dom4j&lt;/artifactId&gt;
              &lt;version&gt;1.6.1&lt;/version&gt;
          &lt;/dependency&gt;--&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.eclipse.persistence&lt;/groupId&gt;
              &lt;artifactId&gt;eclipselink&lt;/artifactId&gt;
              &lt;version&gt;2.5.2&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.fasterxml.jackson.datatype&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-datatype-jsr310&lt;/artifactId&gt;
              &lt;version&gt;2.9.9&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;net.masterthought&lt;/groupId&gt;
              &lt;artifactId&gt;cucumber-reporting&lt;/artifactId&gt;
              &lt;version&gt;4.8.0&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
  
  
  
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.19&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;testFailureIgnore&gt;true&lt;/testFailureIgnore&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;net.masterthought&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-cucumber-reporting&lt;/artifactId&gt;
                  &lt;version&gt;4.2.3&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;execution&lt;/id&gt;
                          &lt;phase&gt;verify&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;generate&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;projectName&gt;firstspringbootproject&lt;/projectName&gt;
                              &lt;outputDirectory&gt;${project.build.directory}/cucumber-report-html&lt;/outputDirectory&gt;
                              &lt;!--&lt;cucumberOutput&gt;${project.build.directory}/cucumber.json&lt;/cucumberOutput&gt;--&gt;
                              &lt;jsonFiles&gt;
                                  &lt;param&gt;${project.build.directory}/cucumber.json&lt;/param&gt;
                              &lt;/jsonFiles&gt;
                              &lt;!--&lt;checkBuildResult&gt;false&lt;/checkBuildResult&gt;--&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
  
  &lt;/project&gt;
  </code></pre>
  
  <p>I get the below error, when i run my tests from command prompt (mvn verify) - </p>
  
  <pre><code>[INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time:  38.981 s
  [INFO] Finished at: 2019-08-13T17:54:55+01:00
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal net.masterthought:maven-cucumber-reporting:4.2.3:generate (execution) on project first-springboot-project: Error Found:: BUILD FAILED - Check Report For Details -&gt; [Help 1]
  [ERROR]
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR]
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
  </code></pre>
  
  <p>When i open the report(overview-features.html) - </p>
  
  <pre><code>net.masterthought.cucumber.ValidationException: No report file was added!
      at net.masterthought.cucumber.ReportParser.parseJsonFiles(ReportParser.java:58)
      at net.masterthought.cucumber.ReportBuilder.generateReports(ReportBuilder.java:88)
      at net.masterthought.cucumber.CucumberReportGeneratorMojo.execute(CucumberReportGeneratorMojo.java:155)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
      at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:956)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:192)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:567)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
  </code></pre>
  
  <p>There is one more point, my cucumber tests ran before it starts generating the report, but it shows below like this:</p>
  
  <p>Below is my Scenario:</p>
  
  <pre><code>Now User validates the Slot dates with the Exception Dates
  
    Scenario: Test GetDates Scenario End to End test    # features/Demo.feature:4
      Given User hits the  getDates API Service Request # StepDefs.user_hits_the_getDates_API_Service_Request(DataTable)
      When User gets the getDates API Service Response  # StepDefs.user_gets_the_getDates_API_Service_Response()
      Then User validates Response from Database        # StepDefs.user_validates_Response_from_Database()
  </code></pre>
  
  <p>then get below messages on CMD:</p>
  
  <pre><code>1 Scenarios (1 passed)
  3 Steps (3 passed)
  0m5.222s
  
  Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 25.99 sec - in BDD.CucumberTest
  2019-08-13 17:54:51.021  INFO 30012 --- [       Thread-2] ationConfigEmbeddedWebApplicationContext : Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@385ef531: startup date [Tue Aug 13 17:54:39 BST 2019]; root of context hierarchy
  
  Results :
  
  Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
  
  [INFO]
  [INFO] --- maven-jar-plugin:2.6:jar (default-jar) @ first-springboot-project ---
  [INFO] Building jar: C:\Users\sagar.wadhwa\SCDT\BLOOM\PREBLOOM\adrs3\firstspringbootproject\target\first-springboot-project-1.0-SNAPSHOT.jar
  [INFO]
  [INFO] --- spring-boot-maven-plugin:1.5.3.RELEASE:repackage (default) @ first-springboot-project ---
  [INFO]
  [INFO] --- maven-cucumber-reporting:4.2.3:generate (execution) @ first-springboot-project ---
  [INFO] About to generate Cucumber report.
  Aug 13, 2019 5:54:54 PM net.masterthought.cucumber.ReportBuilder generateErrorPage
  INFO: Unexpected error
  net.masterthought.cucumber.ValidationException: No report file was added!
          at net.masterthought.cucumber.ReportParser.parseJsonFiles(ReportParser.java:58)
          at net.masterthought.cucumber.ReportBuilder.generateReports(ReportBuilder.java:88)
          at net.masterthought.cucumber.CucumberReportGeneratorMojo.execute(CucumberReportGeneratorMojo.java:155)
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
          at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
          at org.apache.maven.cli.MavenCli.execute(MavenCli.java:956)
          at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
          at org.apache.maven.cli.MavenCli.main(MavenCli.java:192)
          at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.base/java.lang.reflect.Method.invoke(Method.java:567)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
  
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  </code></pre>
  
  <p>CAN ANYONE HELP WITH THIS PLEASE?</p>