在Maven中生成黄瓜报告时出错

问题描述 投票:3回答:1

我使用Java和Cucumber进行测试。我的测试通过了,我想在使用Cucumber运行测试后生成报告。所以我运行终端:mvn clean verify。但是我得到如下错误:

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running mgl.example.RunTest
@first
Feature: Test drag-drop and scroll options

  Scenario: Drag-drop and scroll must be OK                    # MoveAndScroll.feature:3
    Given I move from the root role dialog to choosing picture # AddNewDevice.i_move_from_the_root_role_dialog_to_choosing_picture()
    When I Choose picture and click continue                   # AddNewDevice.i_Choose_picture_and_click_continue()
    Then I can drag-drop device and scroll options             # AddNewDevice.i_can_drag_drop_device_and_scroll_options()

1 Scenarios (1 passed)
3 Steps (3 passed)
2m12.865s

Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 133.918 sec - in mgl.example.RunTest

Results :

Tests run: 4, Failures: 0, Errors: 0, Skipped: 0

[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ Example ---
[INFO] Building jar: /Users/enclaveit/Documents/workspace/Example/target/Example-0.0.1-SNAPSHOT.jar
[INFO] 
[INFO] --- maven-cucumber-reporting:0.0.6:generate (execution) @ Example ---
About to generate
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:24 min
[INFO] Finished at: 2014-06-17T17:07:09+07:00
[INFO] Final Memory: 16M/200M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal net.masterthought:maven-cucumber-reporting:0.0.6:generate (execution) on project Example: Error Found: BUILD FAILED - Check Report For Details -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal net.masterthought:maven-cucumber-reporting:0.0.6:generate (execution) on project Example: Error Found:
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error Found:
    at net.masterthought.cucumber.CucumberReportGeneratorMojo.execute(CucumberReportGeneratorMojo.java:86)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    ... 19 more
Caused by: org.apache.maven.plugin.MojoExecutionException: BUILD FAILED - Check Report For Details
    at net.masterthought.cucumber.CucumberReportGeneratorMojo.execute(CucumberReportGeneratorMojo.java:82)
    ... 21 more
[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

有人可以帮我吗?

cucumber-jvm
1个回答
0
投票

我也面临着无法执行目标net.masterthought:maven-cucumber-reporting:3.8.0:generate(execution)的问题。您能帮助解决问题吗?>

© www.soinside.com 2019 - 2024. All rights reserved.