[JIRA] [nunit-plugin] (JENKINS-34452) Nunit plugin in raises exception if there are no tests in nunit xml

4 views
Skip to first unread message

ceddlyburge@gmail.com (JIRA)

unread,
Apr 26, 2016, 12:14:02 PM4/26/16
to jenkinsc...@googlegroups.com
cedd burge created an issue
 
Jenkins / Bug JENKINS-34452
Nunit plugin in raises exception if there are no tests in nunit xml
Issue Type: Bug Bug
Assignee: Bruno P. Kinoshita
Components: nunit-plugin
Created: 2016/Apr/26 4:13 PM
Environment: nunit 0.17, jenkins 1.651.1
Priority: Major Major
Reporter: cedd burge

I recently upgraded jenkins and all our plugins and some of our builds are failing.

After investigation it turns out that we produce some nunit test xml files that have no test results in (we might have set a test to [Ignore] temporarily for example).

These used to work, and now do not.

Example xml:

<?xml version="1.0" encoding="UTF-8"?><testsuite errors="0" failures="0" name="RES.Coordinate.Calculation.Test.TurkeyTest" skipped="1" tests="1" time="">
<testcase classname="RES.Coordinate.Calculation.Test.TurkeyTest" name="ED1950_to_WGS84("T1",556351,4611739,27.67626007d,41.65371627d)">
<skipped message=""/>
</testcase>
</testsuite>

The output is as follows:

Recording NUnit tests results
ERROR: Step ‘Publish NUnit test result report’ aborted due to exception:
java.io.IOException: Failed to read D:\EX00_WS\temporary-junit-reports\TEST-RES.Coordinate.Calculation.Test.TurkeyTest_2.xml
at hudson.tasks.junit.TestResult.parse(TestResult.java:306)
at hudson.tasks.junit.TestResult.parsePossiblyEmpty(TestResult.java:244)
at hudson.tasks.junit.TestResult.parse(TestResult.java:175)
at hudson.tasks.junit.TestResult.parse(TestResult.java:154)
at hudson.tasks.junit.TestResult.<init>(TestResult.java:126)
at hudson.plugins.nunit.NUnitPublisher$1.invoke(NUnitPublisher.java:202)
at hudson.plugins.nunit.NUnitPublisher$1.invoke(NUnitPublisher.java:191)
at hudson.FilePath.act(FilePath.java:990)
at hudson.FilePath.act(FilePath.java:968)
at hudson.plugins.nunit.NUnitPublisher.getTestResult(NUnitPublisher.java:191)
at hudson.plugins.nunit.NUnitPublisher.recordTestResult(NUnitPublisher.java:147)
at hudson.plugins.nunit.NUnitPublisher.perform(NUnitPublisher.java:109)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
at hudson.model.Build$BuildExecution.post2(Build.java:185)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
at hudson.model.Run.execute(Run.java:1763)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: java.lang.NumberFormatException: empty String
at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
at sun.misc.FloatingDecimal.parseFloat(Unknown Source)
at java.lang.Float.parseFloat(Unknown Source)
at hudson.tasks.junit.SuiteResult.<init>(SuiteResult.java:170)
at hudson.tasks.junit.SuiteResult.parseSuite(SuiteResult.java:144)
at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:129)
at hudson.tasks.junit.TestResult.parse(TestResult.java:301)
... 20 more
Build result "FAILURE". Skipping script.

Cheers

Cedd

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

daflame76@gmail.com (JIRA)

unread,
May 2, 2016, 11:35:01 AM5/2/16
to jenkinsc...@googlegroups.com
Jeremy Wilkins commented on Bug JENKINS-34452
 
Re: Nunit plugin in raises exception if there are no tests in nunit xml

I am also encountering this issue. It seems to happen when all the tests in a test fixture are marked as ignored for me as well.

niig@noitso.dk (JIRA)

unread,
May 6, 2016, 7:48:01 AM5/6/16
to jenkinsc...@googlegroups.com

I experience the same issue with any tests that are marked with ignore attribute.

ERROR: Step ‘Publish NUnit test result report’ aborted due to exception:

java.io.IOException: Failed to read T:\workspace\project\temporary-junit-reports\TEST-testcase.xml


at hudson.tasks.junit.TestResult.parse(TestResult.java:306)
at hudson.tasks.junit.TestResult.parsePossiblyEmpty(TestResult.java:244)
at hudson.tasks.junit.TestResult.parse(TestResult.java:175)
at hudson.tasks.junit.TestResult.parse(TestResult.java:154)
at hudson.tasks.junit.TestResult.<init>(TestResult.java:126)

at hudson.plugins.nunit.NUnitPublisher$1.invoke(NUnitPublisher.java:243)
at hudson.plugins.nunit.NUnitPublisher$1.invoke(NUnitPublisher.java:226)


at hudson.FilePath.act(FilePath.java:990)
at hudson.FilePath.act(FilePath.java:968)

at hudson.plugins.nunit.NUnitPublisher.getTestResult(NUnitPublisher.java:226)
at hudson.plugins.nunit.NUnitPublisher.recordTestResult(NUnitPublisher.java:189)
at hudson.plugins.nunit.NUnitPublisher.perform(NUnitPublisher.java:152)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)


at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
at hudson.model.Build$BuildExecution.post2(Build.java:185)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
at hudson.model.Run.execute(Run.java:1763)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: java.lang.NumberFormatException: empty String
at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)

at java.lang.Float.parseFloat(Unknown Source)
at hudson.tasks.junit.SuiteResult.<init>(SuiteResult.java:170)
at hudson.tasks.junit.SuiteResult.parseSuite(SuiteResult.java:144)
at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:129)
at hudson.tasks.junit.TestResult.parse(TestResult.java:301)
... 20 more

slide.o.mix@gmail.com (JIRA)

unread,
Feb 16, 2017, 7:43:03 PM2/16/17
to jenkinsc...@googlegroups.com

Can someone please upload an nunit xml file that causes this issue?

This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

slide.o.mix@gmail.com (JIRA)

unread,
Feb 16, 2017, 7:43:05 PM2/16/17
to jenkinsc...@googlegroups.com
Alex Earl assigned an issue to Alex Earl
 
Change By: Alex Earl
Assignee: Bruno P. Kinoshita Alex Earl
Reply all
Reply to author
Forward
0 new messages