Details

    • Similar Issues:

      Description

      Upgrading the junit-plugin from 1.11 to 1.12 fails with a parse error.
      I guess this relates to "PR #35" because the skipped (Ignore attr.) test result file's "time" attr. is empty.
      While the originator of the file (NUnit) should store a meaningful default (like "00:00:00" "0.0"), its up to the consumer to provide robust parsing, either by ignoring the "skipped" tests at all or by ignoring the empty string.

      // Jenkins log stacktrace
      [16:48:06.879] ERROR: Step ‘Publish NUnit test result report’ aborted due to exception:
      [16:48:06.879] java.io.IOException: Failed to read C:\Jenkins\workspace\Foo\temporary-junit-reports\TEST-Bar.Common.Test.Utils.AccessorTest_13_2.xml
      [16:48:06.879] at hudson.tasks.junit.TestResult.parse(TestResult.java:306)
      [16:48:06.879] at hudson.tasks.junit.TestResult.parsePossiblyEmpty(TestResult.java:244)
      [16:48:06.879] at hudson.tasks.junit.TestResult.parse(TestResult.java:175)
      [16:48:06.879] at hudson.tasks.junit.TestResult.parse(TestResult.java:154)
      [16:48:06.879] at hudson.tasks.junit.TestResult.<init>(TestResult.java:126)
      [16:48:06.879] at hudson.plugins.nunit.NUnitPublisher$1.invoke(NUnitPublisher.java:243)
      [16:48:06.879] at hudson.plugins.nunit.NUnitPublisher$1.invoke(NUnitPublisher.java:226)
      [16:48:06.879] at hudson.FilePath.act(FilePath.java:990)
      [16:48:06.879] at hudson.FilePath.act(FilePath.java:968)
      [16:48:06.879] at hudson.plugins.nunit.NUnitPublisher.getTestResult(NUnitPublisher.java:226)
      [16:48:06.879] at hudson.plugins.nunit.NUnitPublisher.recordTestResult(NUnitPublisher.java:189)
      [16:48:06.879] at hudson.plugins.nunit.NUnitPublisher.perform(NUnitPublisher.java:152)
      [16:48:06.879] at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      [16:48:06.879] at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
      [16:48:06.879] at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
      [16:48:06.879] at hudson.model.Build$BuildExecution.post2(Build.java:185)
      [16:48:06.879] at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
      [16:48:06.879] at hudson.model.Run.execute(Run.java:1763)
      [16:48:06.879] at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      [16:48:06.879] at hudson.model.ResourceController.execute(ResourceController.java:98)
      [16:48:06.879] at hudson.model.Executor.run(Executor.java:410)
      [16:48:06.879] Caused by: java.lang.NumberFormatException: empty String
      [16:48:06.879] at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
      [16:48:06.879] at sun.misc.FloatingDecimal.parseFloat(Unknown Source)
      [16:48:06.879] at java.lang.Float.parseFloat(Unknown Source)
      [16:48:06.879] at hudson.tasks.junit.SuiteResult.<init>(SuiteResult.java:170)
      [16:48:06.879] at hudson.tasks.junit.SuiteResult.parseSuite(SuiteResult.java:144)
      [16:48:06.879] at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:129)
      [16:48:06.879] at hudson.tasks.junit.TestResult.parse(TestResult.java:301)
      [16:48:06.879] ... 20 more

      // UnitTest.result file
      <?xml version="1.0" encoding="UTF-8"?><testsuite errors="0" failures="0" name="Foo.Common.Test.Utils.AccessorTest" skipped="1" tests="1" time="">
      <testcase classname="Foo.Common.Test.Utils.AccessorTest" name="InternalStaticMethod_DirectAccess()">
      <skipped message="Assembly containing class to access is not the use case."/>
      </testcase>
      </testsuite>

        Attachments

          Issue Links

            Activity

            Hide
            georgefischhof George Fischhof added a comment -

            the issue I reported against 1.18 was my mistake (I used a wrong xml file)

            Show
            georgefischhof George Fischhof added a comment - the issue I reported against 1.18 was my mistake (I used a wrong xml file)
            Hide
            georgefischhof George Fischhof added a comment -

            please close this issue, it is good in 1.18

            Show
            georgefischhof George Fischhof added a comment - please close this issue, it is good in 1.18
            Hide
            georgefischhof George Fischhof added a comment -

            The error was my mistake: accidentally I put an attribute to node in the xml file.
            When I fixed the xml, the parsing was good

            Sorry guys.

            Show
            georgefischhof George Fischhof added a comment - The error was my mistake: accidentally I put an attribute to node in the xml file. When I fixed the xml, the parsing was good Sorry guys.
            Hide
            olivergondza Oliver Gondža added a comment -

            George Fischhof, That stacktrace is unrelated to this issue. Please file a separate one if it is not already.

            Show
            olivergondza Oliver Gondža added a comment - George Fischhof , That stacktrace is unrelated to this issue. Please file a separate one if it is not already.
            Hide
            georgefischhof George Fischhof added a comment -

            I have the same issue with JUnit plugin version 1.18, Jenkins 2.18, on windows 8.1 x64, JAVA_VERSION="1.8.0_91"

            stack trace:

            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.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:132)
            at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:107)
            at hudson.FilePath.act(FilePath.java:1018)
            at hudson.FilePath.act(FilePath.java:996)
            at hudson.tasks.junit.JUnitParser.parseResult(JUnitParser.java:103)
            at hudson.tasks.junit.JUnitResultArchiver.parse(JUnitResultArchiver.java:128)
            at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:149)
            at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
            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:720)
            at hudson.model.Build$BuildExecution.post2(Build.java:185)
            at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665)
            at hudson.model.Run.execute(Run.java:1745)
            at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
            at hudson.model.ResourceController.execute(ResourceController.java:98)
            at hudson.model.Executor.run(Executor.java:404)
            Caused by: java.lang.NullPointerException
            at hudson.tasks.junit.CaseResult.<init>(CaseResult.java:116)
            at hudson.tasks.junit.SuiteResult.<init>(SuiteResult.java:200)
            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)
            ... 21 more

            Show
            georgefischhof George Fischhof added a comment - I have the same issue with JUnit plugin version 1.18, Jenkins 2.18, on windows 8.1 x64, JAVA_VERSION="1.8.0_91" stack trace: 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.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:132) at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:107) at hudson.FilePath.act(FilePath.java:1018) at hudson.FilePath.act(FilePath.java:996) at hudson.tasks.junit.JUnitParser.parseResult(JUnitParser.java:103) at hudson.tasks.junit.JUnitResultArchiver.parse(JUnitResultArchiver.java:128) at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:149) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78) 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:720) at hudson.model.Build$BuildExecution.post2(Build.java:185) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665) at hudson.model.Run.execute(Run.java:1745) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:404) Caused by: java.lang.NullPointerException at hudson.tasks.junit.CaseResult.<init>(CaseResult.java:116) at hudson.tasks.junit.SuiteResult.<init>(SuiteResult.java:200) 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) ... 21 more

              People

              • Assignee:
                Unassigned
                Reporter:
                fuege André Fügenschuh
              • Votes:
                7 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: