Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jenkins Allure报告错误地显示了0个套件和测试—Can';不要执行Maven的目标_Maven_Jenkins Plugins_Junit4_Maven Surefire Plugin_Allure - Fatal编程技术网

Jenkins Allure报告错误地显示了0个套件和测试—Can';不要执行Maven的目标

Jenkins Allure报告错误地显示了0个套件和测试—Can';不要执行Maven的目标,maven,jenkins-plugins,junit4,maven-surefire-plugin,allure,Maven,Jenkins Plugins,Junit4,Maven Surefire Plugin,Allure,我试图将诱惑测试报告框架用于JUnit4、Maven和Jenkins。我已经用必要的依赖项更新了pom.xml,当我在Jenkins中构建项目时,Allure报告附加到构建中,但它显示了0个测试套件和0个测试,全部通过,没有其他信息 有几十个测试应该显示为已被破坏,还有一些测试是合法通过的。我正在使用Jenkins诱惑插件的默认设置。测试运行后,XML报告将在正确的目录中生成;它们似乎并没有实际填充附加到构建的报告 以下是Jenkins中带有stacktrace的控制台输出: [ERROR] F

我试图将诱惑测试报告框架用于JUnit4、Maven和Jenkins。我已经用必要的依赖项更新了pom.xml,当我在Jenkins中构建项目时,Allure报告附加到构建中,但它显示了0个测试套件和0个测试,全部通过,没有其他信息

有几十个测试应该显示为已被破坏,还有一些测试是合法通过的。我正在使用Jenkins诱惑插件的默认设置。测试运行后,XML报告将在正确的目录中生成;它们似乎并没有实际填充附加到构建的报告

以下是Jenkins中带有stacktrace的控制台输出:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project project-platform: There are test failures.
[ERROR] 
[ERROR] Please refer to /usr/share/tomcat/.jenkins/workspace/testingprojectplatform/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project project-platform: There are test failures.

Please refer to /usr/share/tomcat/.jenkins/workspace/testingprojectplatform/target/surefire-reports for the individual test results.
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
    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:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    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:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:414)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:357)
Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures.

Please refer to /usr/share/tomcat/.jenkins/workspace/testingprojectplatform/target/surefire-reports for the individual test results.
    at org.apache.maven.plugin.surefire.SurefireHelper.reportExecution(SurefireHelper.java:82)
    at org.apache.maven.plugin.surefire.SurefirePlugin.handleSummary(SurefirePlugin.java:254)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:854)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:722)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    ... 19 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/MojoFailureException
Build step 'Invoke top-level Maven targets' marked build as failure
Allure Report Generation: started
Allure Report Generation: find directories by mask [target/surefire-reports/]
Allure Report Generation: found allure result directories [/usr/share/tomcat/.jenkins/workspace/testingprojectplatform/target/surefire-reports]
Allure Report Generation: copy founded directories in directory [/usr/share/tomcat/.jenkins/workspace/testingprojectplatform/allure4540046437484771478.tmp/results]
Allure Report Generation: generate report from directory [/usr/share/tomcat/.jenkins/workspace/testingprojectplatform/allure4540046437484771478.tmp]
Allure Report Generation: proxy settings [active:'false', host:'null', port:'0', username:'null', password: '']
Allure Report Generation: attach report link to build and project
Allure Report Generation: completed
Skipped archiving because build is not successful
Finished: FAILURE
以下是my target/surefire reports目录中的一个.txt文件,其中有一个错误:

-------------------------------------------------------------------------------
Test set: com.company.project.rest.VisitRestTest
-------------------------------------------------------------------------------
Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.256 sec <<< FAILURE!
com.company.project.rest.VisitRestTest  Time elapsed: 0.256 sec  <<< ERROR!
java.lang.NoSuchMethodError: org.apache.commons.beanutils.ConvertUtilsBean.register(ZZI)V
    at ru.yandex.qatools.properties.decorators.DefaultFieldDecorator.<init>(DefaultFieldDecorator.java:24)
    at ru.yandex.qatools.properties.PropertyLoader.populate(PropertyLoader.java:29)
    at ru.yandex.qatools.properties.PropertyLoader.populate(PropertyLoader.java:23)
    at ru.yandex.qatools.allure.config.AllureConfig.<init>(AllureConfig.java:80)
    at ru.yandex.qatools.allure.config.AllureConfig.newInstance(AllureConfig.java:84)
    at ru.yandex.qatools.allure.Allure.fire(Allure.java:146)
    at ru.yandex.qatools.allure.junit.AllureRunListener.testFinished(AllureRunListener.java:84)
    at org.junit.runner.notification.SynchronizedRunListener.testFinished(SynchronizedRunListener.java:56)
    at org.junit.runner.notification.RunNotifier$7.notifyListener(RunNotifier.java:190)
    at org.junit.runner.notification.RunNotifier$SafeNotifier.run(RunNotifier.java:72)
    at org.junit.runner.notification.RunNotifier.fireTestFinished(RunNotifier.java:187)
    at org.junit.internal.runners.model.EachTestNotifier.fireTestFinished(EachTestNotifier.java:38)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:331)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray2(ReflectionUtils.java:208)
    at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:158)
    at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:86)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:95)
-------------------------------------------------------------------------------
测试集:com.company.project.rest.VisitRestTest
-------------------------------------------------------------------------------

测试运行:2,失败:0,错误:1,跳过:0,时间:0.256秒请检查这些XML文件是否包含有关测试用例的信息,以及Allure report目录是否包含包含JSON文件的数据目录,其中JSON文件包含相同的信息,并在其中添加了一些内容。在my target/surefire reports目录中,有一个XML文件和一个.txt文件,其中包含有关每个测试的信息案例。我没有看到包含JSON文件的数据目录。请检查这些XML文件是否包含有关测试用例的信息,以及Allure report目录是否包含包含包含相同信息的JSON文件的数据目录,其中包含一些附加内容。在我的目标/surefire reports目录中,有一个XML文件和一个包含信息的.txt文件关于我的每个测试用例。我没有看到包含JSON文件的数据目录。
<dependency>
    <groupId>commons-beanutils</groupId>
    <artifactId>commons-beanutils</artifactId>
    <version>1.9.2</version>
    <scope>test</scope>
</dependency>