Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-53165

Conversion Exception for NUnit2 XML Format when nunit-version is a String

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: xunit-plugin
    • Labels:
      None
    • Environment:
      xUnit Plugin 2.2.3
      jest-nunit-reporter 1.3.0
    • Similar Issues:

      Description

      This seems to be an incompatibility with https://github.com/kingatlas/jest-nunit-reporter which generates "na" as the nunit-version.

      As a result we get this conversion error:

      org.jenkinsci.plugins.xunit.service.TransformerException: Conversion error: Cannot convert string "" to a double
      	at org.jenkinsci.plugins.xunit.service.XUnitConversionService.convert(XUnitConversionService.java:81)
      	at org.jenkinsci.plugins.xunit.service.XUnitTransformerCallable.invoke(XUnitTransformerCallable.java:120)
      	at org.jenkinsci.plugins.xunit.service.XUnitTransformerCallable.invoke(XUnitTransformerCallable.java:39)
      	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2750)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:208)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
      	at hudson.remoting.Request$2.run(Request.java:360)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at hudson.remoting.Engine$1$1.run(Engine.java:98)
      	at java.lang.Thread.run(Thread.java:745)
      	at ......remote call to JNLP4-connect connection from 10.48.41.61/10.48.41.61:49693(Native Method)
      	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1654)
      	at hudson.remoting.UserResponse.retrieve(UserRequest.java:311)
      	at hudson.remoting.Channel.call(Channel.java:905)
      	at hudson.FilePath.act(FilePath.java:987)
      

      Root cause seems to be the nunit-version="na" attribute:

      <?xml version="1.0" encoding="UTF-8"?>
      <test-results name="jest results" date="2018-08-21" time="13:25:10" invalid="0" ignored="0" inconclusive="0" not-run="0" errors="0" total="1" failures="0" skipped="0">
        <environment nunit-version="na" clr-version="na" os-version="10.0.17134" platform="win32" cwd="C:\jenkins\workspace\y-AZJT2AES7D\src\foobar" user="na" user-domain="na" machine-name="DESKTOP-12345"/>
        <culture-info current-culture="na" current-uiculture="na"/>
        <test-suite name="Foo.Bar" time="1.987" executed="True" success="True" result="Success" type="TestFixture">
          <results>
            <test-case name="the foo is not a bar" executed="True" result="Success" time="0">
            </test-case>
          </results>
        </test-suite>
      </test-results>
      

      See attached report file

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              nfalco Nikolas Falco
              Reporter:
              tknerr Torben Knerr
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: