为什么XUnit插件不能与Jenkins一起使用? [英] Why is the XUnit plugin not working with Jenkins?
问题描述
我从jenkins启动了测试IDE(硒),并上传了XUNIT插件以获取不错的测试报告,但最后我得到了此错误消息:
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?
推荐答案
当我第一次启用XUnit插件时,我也收到此错误.
I was getting this error too when I first enabled the XUnit plugin.
我没有意识到(或者已经忘记了)我需要向XUnit构建步骤配置中添加报告类型.这样做,单击Add
,然后选择要分析的报告类型(对我来说是PHPUnit-3.x
).请参见此屏幕截图.您还必须指定要解析的XML报告文件的路径. (我使用的是Codeception,所以是tests/_log/*.xml
.)
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
.)
这篇关于为什么XUnit插件不能与Jenkins一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!