Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Surefire error on test failures with --xml-result option #159

Open
amirjamak opened this issue Mar 26, 2015 · 1 comment
Open

Surefire error on test failures with --xml-result option #159

amirjamak opened this issue Mar 26, 2015 · 1 comment
Assignees

Comments

@amirjamak
Copy link

Using --xml-result option works fine when all tests are passing.
If a single test fails (not an error, simple assert fail) then I receive nullpointer error on Surefire execution report-only of goal.
Stacktrace:

[INFO] --- maven-surefire-report-plugin:2.18.1:report-only (report-only) @ ProjectName ---
[WARNING] Unable to locate Test Source XRef to link to - DISABLED
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 32:03 min
[INFO] Finished at: 2015-03-24T14:48:29+01:00

[INFO] Final Memory: 135M/708M
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-report-plugin:2.18.1:report-only (report-only) on project ProjectName: Execution report-only of goal org.apache.maven.plugins:maven-surefire-report-plugin:2.18.1:report-only failed. NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-report-plugin:2.18.1:report-only (report-only) on project ProjectName: Execution report-only of goal org.apache.maven.plugins:maven-surefire-report-plugin:2.18.1:report-only failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
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.jvnet.hudson.maven3.launcher.Maven32Launcher.main(Maven32Launcher.java:132)
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.launchStandard(Launcher.java:330)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
at jenkins.maven3.agent.Maven32Main.launch(Maven32Main.java:181)
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 hudson.maven.Maven3Builder.call(Maven3Builder.java:136)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:71)
at hudson.remoting.UserRequest.perform(UserRequest.java:121)
at hudson.remoting.UserRequest.perform(UserRequest.java:49)
at hudson.remoting.Request$2.run(Request.java:324)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution report-only of goal org.apache.maven.plugins:maven-surefire-report-plugin:2.18.1:report-only failed.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:144)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 30 more
Caused by: java.lang.NullPointerException
at org.apache.maven.plugins.surefire.report.SurefireReportGenerator.sinkIcon(SurefireReportGenerator.java:737)
at org.apache.maven.plugins.surefire.report.SurefireReportGenerator.constructTestCaseSection(SurefireReportGenerator.java:455)
at org.apache.maven.plugins.surefire.report.SurefireReportGenerator.constructTestCasesSection(SurefireReportGenerator.java:425)
at org.apache.maven.plugins.surefire.report.SurefireReportGenerator.doGenerateReport(SurefireReportGenerator.java:99)
at org.apache.maven.plugins.surefire.report.AbstractSurefireReportMojo.executeReport(AbstractSurefireReportMojo.java:159)
at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:255)
at org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:143)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)

@vmi
Copy link
Owner

vmi commented Mar 27, 2015

Hi,

Can you provide minimal test case and pom.xml?

@vmi vmi added the bug label Mar 28, 2015
@vmi vmi self-assigned this Mar 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants