Publish testing tools result report fails with Java error (xUnit plugin)

178 views
Skip to first unread message

Hans

unread,
Nov 29, 2011, 8:35:55 AM11/29/11
to Jenkins Users
Hello,

I have a Jenkins job that triggers a Phing build script which in turn
runs a few units tests. The job is mostly based on the tutorial of
http://jenkins-php.org/. The results of the unit tests are published
using the xUnit plugin. During the build execution I encounter the
following Java error:

[xUnit] [INFO] - Starting to record.
[xUnit] [INFO] - Processing PHPUnit-3.4 (default)
[xUnit] [INFO] - [PHPUnit-3.4 (default)] - 1 test report file(s) were
found with the pattern 'build/logs/junit.xml' relative to '/var/lib/
jenkins/jobs/<job>/workspace' for the testing framework 'PHPUnit-3.4
(default)'.
[xUnit] [INFO] - Check 'Failed Tests' threshold.
ERROR: Publisher com.thalesgroup.hudson.plugins.xunit.XUnitPublisher
aborted due to exception
java.lang.NumberFormatException: For input string: ""
at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:
48)
at java.lang.Integer.parseInt(Integer.java:470)
at java.lang.Integer.parseInt(Integer.java:499)
at
org.jenkinsci.plugins.xunit.threshold.XUnitThreshold.convertToInteger(XUnitThreshold.java:
60)
at
org.jenkinsci.plugins.xunit.threshold.XUnitThreshold.getResultThreshold(XUnitThreshold.java:
76)
at
org.jenkinsci.plugins.xunit.threshold.FailedThreshold.getResultThreshold(FailedThreshold.java:
33)
at
com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.processResultThreshold(XUnitPublisher.java:
357)
at
com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.getResultWithThreshold(XUnitPublisher.java:
345)
at
com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.setBuildStatus(XUnitPublisher.java:
330)
at
com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.performXUnit(XUnitPublisher.java:
133)
at
com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:
101)
at hudson.tasks.BuildStepMonitor
$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild
$AbstractRunner.perform(AbstractBuild.java:692)
at hudson.model.AbstractBuild
$AbstractRunner.performAllBuildSteps(AbstractBuild.java:667)
at hudson.model.AbstractBuild
$AbstractRunner.performAllBuildSteps(AbstractBuild.java:645)
at hudson.model.Build$RunnerImpl.post2(Build.java:162)
at hudson.model.AbstractBuild
$AbstractRunner.post(AbstractBuild.java:614)
at hudson.model.Run.run(Run.java:1429)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at
hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:238)

As you can see the XML file is correctly in place and can be found.
Maybe there is something wrong in the XML file or this could be a bug
in the plugin. Any thoughts on why this is happening and what a
solution might be? If you need any more information please let me
know.

Kind regards,

Hans

Erick Dovale

unread,
Nov 30, 2011, 11:13:34 AM11/30/11
to jenkins...@googlegroups.com
I reported this bug in Jira already. I experience the same problem and the solution was to downgrade this plugin to the previous version.
Reply all
Reply to author
Forward
0 new messages