Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is the XUnit plugin not working with Jenkins?

I launched the tests IDE (selenium) from jenkins and I uploaded the XUNIT plugin for having a nice report of test but at the end I obtained this message of ERROR :

Tests failed, see result file for details:

D:\FTP\stm_atos_automatisation\rapports\ff39\rapport_ff39.html ERROR: Build step failed with exception java.lang.NullPointerException: The types section is required.
at org.jenkinsci.plugins.xunit.XUnitProcessor.<init>(XUnitProcessor.java:65)
at org.jenkinsci.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:111)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726)
at hudson.model.Build$BuildExecution.post2(Build.java:185)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
at hudson.model.Run.execute(Run.java:1766)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:381) Build step 'Publish xUnit test result report' marked build as failure Finished: FAILURE

Is there any way to solve this problem?

like image 222
Khalid Ksouri Avatar asked Aug 05 '15 13:08

Khalid Ksouri


1 Answers

I was getting this error too when I first enabled the XUnit plugin.

I hadn't realized (or had forgotten) that I needed to add a report type to the XUnit build step configuration. To do so, click Add and then select the type of report you want parsed (for me it was PHPUnit-3.x). See this screenshot. You'll also have to specify the path to the XML report files that you want parsed. (I'm using Codeception, so it was tests/_log/*.xml.)

like image 166
Scott Weldon Avatar answered Oct 27 '22 00:10

Scott Weldon