damianszczepanik / maven-cucumber-reporting

maven mojo for cucumber reporting
GNU Lesser General Public License v2.1
120 stars 111 forks source link

Failed to execute goal net.masterthought:maven-cucumber-reporting:5.0.0:generate (execution) on project #174

Closed gulhankarali closed 3 years ago

gulhankarali commented 4 years ago

open new issue with details

Originally posted by @damianszczepanik in https://github.com/damianszczepanik/maven-cucumber-reporting/issues/116#issuecomment-512954940

After I set up commandline maven on my computer which is a mac, I started to have problems with the Intellij Maven Verify option. Meaning it does not produce report and it gives the error: Failed to execute goal net.masterthought:maven-cucumber-reporting:5.0.0:generate (execution) on project

How can I solve the problem? Thanks,

GBRAGU1 commented 4 years ago

I have the same problem, How can I solve the problem? Thanks,

haiderIRQ commented 3 years ago

Hi, I'm facing the same issue:

` mvn clean install -e
[INFO] Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] [INFO] -----------------< groupId:SettingTestsEnvironnement >------------------ [INFO] Building SettingTestsEnvironnement 1.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ SettingTestsEnvironnement --- [INFO] Deleting /Users/halhashim001/IdeaProject/SettingTestsEnvironnement/target [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ SettingTestsEnvironnement --- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory /Users/halhashim001/IdeaProject/SettingTestsEnvironnement/src/main/resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ SettingTestsEnvironnement --- [INFO] Changes detected - recompiling the module! [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent! [INFO] Compiling 1 source file to /Users/halhashim001/IdeaProject/SettingTestsEnvironnement/target/classes [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ SettingTestsEnvironnement --- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 4 resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ SettingTestsEnvironnement --- [INFO] Changes detected - recompiling the module! [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent! [INFO] Compiling 8 source files to /Users/halhashim001/IdeaProject/SettingTestsEnvironnement/target/test-classes [INFO] [INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-test) @ SettingTestsEnvironnement --- [INFO] Surefire report directory: /Users/halhashim001/IdeaProject/SettingTestsEnvironnement/target/surefire-reports [INFO] [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running TestRunner Configuring TestNG with: TestNG60Configurator

Scenario Outline: Search for an existing user # src/test/resources/Features/AdminSerachUser.feature:9 Given I navigate to Admin Page interface # null When I insert the user name BEN AJIBA and the first name Youssef # null Then The search functionality should show the user in the auto completed field BEN AJIBA Youssef # null

Scenario Outline: Connexion à Revue Fiscale avec un login valide # src/test/resources/Features/Login.feature:12 Given I navigate to RF url # null And I entered the email superadmin@pwc.com and the password 12345 # null When I click on the login button # null Then The connection is valid, it brings me to the main page # null

Scenario: I want to navigate left panel buttons status in RF without selecting a trinôme # src/test/resources/Features/Navigation.feature:2 Given I navigate to RF connection page # null And I log in with an Admin credentials or SuperAdmin Credentials # null When I am on the main interface # null Then The Sélection et Création interface must be enabled # null And The Upload fichiers et Analyse interface must be disabled # null And The Monitoring interface must be disabled # null And The Admin interface must be enabled # null ┌───────────────────────────────────────────────────────────────────────────────────┐ │ Share your Cucumber Report with your team at https://reports.cucumber.io │ │ Activate publishing with one of the following: │ │ │ │ src/test/resources/cucumber.properties: cucumber.publish.enabled=true │ │ src/test/resources/junit-platform.properties: cucumber.publish.enabled=true │ │ Environment variable: CUCUMBER_PUBLISH_ENABLED=true │ │ JUnit: @CucumberOptions(publish = true) │ │ │ │ More information at https://reports.cucumber.io/docs/cucumber-jvm │ │ │ │ Disable this message with one of the following: │ │ │ │ src/test/resources/cucumber.properties: cucumber.publish.quiet=true │ │ src/test/resources/junit-platform.properties: cucumber.publish.quiet=true │ └───────────────────────────────────────────────────────────────────────────────────┘ [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.479 s - in TestRunner [INFO] [INFO] Results: [INFO] [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ SettingTestsEnvironnement --- [INFO] Building jar: /Users/halhashim001/IdeaProject/SettingTestsEnvironnement/target/SettingTestsEnvironnement-1.0-SNAPSHOT.jar [INFO] [INFO] --- maven-cucumber-reporting:5.4.0:generate (execution) @ SettingTestsEnvironnement --- [INFO] About to generate Cucumber report. nov. 18, 2020 4:04:15 PM net.masterthought.cucumber.ReportBuilder generateErrorPage INFOS: Unexpected error net.masterthought.cucumber.ValidationException: None report file was added! at net.masterthought.cucumber.ReportParser.parseJsonFiles(ReportParser.java:61) at net.masterthought.cucumber.ReportBuilder.generateReports(ReportBuilder.java:93) at net.masterthought.cucumber.CucumberReportGeneratorMojo.execute(CucumberReportGeneratorMojo.java:222) 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:957) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289) at org.apache.maven.cli.MavenCli.main(MavenCli.java:193) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) 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 [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.748 s [INFO] Finished at: 2020-11-18T16:04:15+01:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal net.masterthought:maven-cucumber-reporting:5.4.0:generate (execution) on project SettingTestsEnvironnement: Error Found:: BUILD FAILED - Check Report For Details -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal net.masterthought:maven-cucumber-reporting:5.4.0:generate (execution) on project SettingTestsEnvironnement: Error Found: at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215) 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:957) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289) at org.apache.maven.cli.MavenCli.main (MavenCli.java:193) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:64) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:564) 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) Caused by: org.apache.maven.plugin.MojoExecutionException: Error Found: at net.masterthought.cucumber.CucumberReportGeneratorMojo.execute (CucumberReportGeneratorMojo.java:231) 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:957) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289) at org.apache.maven.cli.MavenCli.main (MavenCli.java:193) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:64) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:564) 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) Caused by: org.apache.maven.plugin.MojoExecutionException: BUILD FAILED - Check Report For Details at net.masterthought.cucumber.CucumberReportGeneratorMojo.execute (CucumberReportGeneratorMojo.java:227) 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:957) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289) at org.apache.maven.cli.MavenCli.main (MavenCli.java:193) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:64) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:564) 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) [ERROR] [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 ` I don't know how to solve this.

Do you have any clue .

Thank you

damianszczepanik commented 3 years ago

You haven't provided JSON report as the input:

net.masterthought.cucumber.ValidationException: None report file was added!

minicandoit commented 3 years ago

Failed to execute goal net.masterthought:maven-cucumber-reporting:5.4.0:generate (execution) on project FruitShopAPI: Error Found:

how can I solve this issue. Before I could generate cucumber report. Now even though I clone a new one I can't create any report and gives the same issue.

minicandoit commented 3 years ago

<?xml version="1.0" encoding="UTF-8"?> <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">

4.0.0
<groupId>org.example</groupId>
<artifactId>cybertek21-cucumber-junit</artifactId>
<version>1.0-SNAPSHOT</version>

<properties>
    <maven.compiler.source>8</maven.compiler.source>
    <maven.compiler.target>8</maven.compiler.target>
</properties>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.6.1</version>
            <configuration>
                <source>8</source>
                <target>8</target>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>3.0.0-M5</version>
            <configuration>
                <parallel>methods</parallel>
                <threadCount>4</threadCount>
                <perCoreThreadCount>false</perCoreThreadCount>
                <testFailureIgnore>true</testFailureIgnore>
                <includes>
                    <include>**/CukesRunner*.java</include>
                </includes>
            </configuration>
        </plugin>
        <plugin>
            <groupId>net.masterthought</groupId>
            <artifactId>maven-cucumber-reporting</artifactId>
            <version>5.4.0</version>
            <executions>
                <execution>
                    <id>execution</id>
                    <phase>verify</phase>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                    <configuration>
                        <projectName>Cucumber HTML Reports</projectName>
                        <outputDirectory>${project.build.directory}</outputDirectory>
                        <inputDirectory>${project.build.directory}</inputDirectory>
                        <jsonFiles>
                            <param>**/cucumber*.json</param>
                        </jsonFiles>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

<dependencies>

    <!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
    <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi-ooxml</artifactId>
        <version>5.0.0</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>3.141.59</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/io.github.bonigarcia/webdrivermanager -->
    <dependency>
        <groupId>io.github.bonigarcia</groupId>
        <artifactId>webdrivermanager</artifactId>
        <version>4.2.2</version>
    </dependency>

    <dependency>
        <groupId>com.github.javafaker</groupId>
        <artifactId>javafaker</artifactId>
        <version>1.0.2</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-java -->
    <dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-java</artifactId>
        <version>6.9.1</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-junit -->
    <dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-junit</artifactId>
        <version>6.9.1</version>
        <scope>test</scope>
    </dependency>

</dependencies>

this is my pom.xml file. it was working fine.

masutcu commented 1 year ago

Thanks for your sharing. Errors are gone but "cucumber reporting" is not reporting. Could there be an error in the path?