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

xUnit.Net v2 parse error when time attribute is missing

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: xunit-plugin
    • Labels:
      None
    • Environment:
      java.runtime.version 1.8.0_101-b13
      os.arch amd64
      os.name Windows 7
      os.version 6.1
      Jenkins ver. 2.126 (running directly, no container)
      xUnit plugin ver. 2.0.1
    • Similar Issues:

      Description

      I have updated on thursday 2018-06-07 jenkins from 2.125 to 2.126 and also some plugins. Also the xunit plugin from 2.0.0 to 2.0.1.

      After this all pipeline jobs failed which has the following workflow.
      INFO: Starting to record.
      INFO: Processing xUnit.Net-v2 (default)
      INFO: [xUnit.Net-v2 (default)] - 1 test report file(s) were found with the pattern 'build/reports/xunit/*.xml' relative to 'C:\Jenkins2\workspace\Api.Csv\Api.Csv-Report' for the testing framework 'xUnit.Net-v2 (default)'.
      ERROR: Conversion error: Cannot convert string "" to a double
      It will be called through a pipeline script

      step([$class: 'XUnitBuilder', testTimeMargin: '3000', thresholdMode: 1, thresholds: [[$class: 'FailedThreshold', failureNewThreshold: '', failureThreshold: '', unstableNewThreshold: '', unstableThreshold: ''], [$class: 'SkippedThreshold', failureNewThreshold: '', failureThreshold: '', unstableNewThreshold: '', unstableThreshold: '']], tools: [[$class: 'XUnitDotNetTestType', deleteOutputFiles: true, failIfNotNew: false, pattern: 'build/reports/xunit/*.xml', skipNoTestFiles: false, stopProcessingIfError: true]]])
      

      And here is the exception stacktrace:

      org.jenkinsci.plugins.xunit.exception.XUnitException: Conversion error: Cannot convert string "" to a double
      	at org.jenkinsci.plugins.xunit.service.XUnitConversionService.convert(XUnitConversionService.java:89)
      	at org.jenkinsci.plugins.xunit.service.XUnitTransformer.invoke(XUnitTransformer.java:136)
      Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from <computer3>/<ip>:<port>
      		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1741)
      		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
      		at hudson.remoting.Channel.call(Channel.java:955)
      		at hudson.FilePath.act(FilePath.java:1089)
      		at hudson.FilePath.act(FilePath.java:1078)
      		at org.jenkinsci.plugins.xunit.XUnitProcessor.performTests(XUnitProcessor.java:207)
      		at org.jenkinsci.plugins.xunit.XUnitProcessor.performXUnit(XUnitProcessor.java:150)
      		at org.jenkinsci.plugins.xunit.XUnitBuilder.perform(XUnitBuilder.java:114)
      		at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)
      		at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)
      		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:49)
      		at hudson.security.ACL.impersonate(ACL.java:290)
      		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:46)
      		at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      		at java.util.concurrent.FutureTask.run(Unknown Source)
      		at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      		at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      Caused: java.io.IOException: There are some problems during the conversion into JUnit reports: 
      	at org.jenkinsci.plugins.xunit.service.XUnitTransformer.invoke(XUnitTransformer.java:170)
      	at org.jenkinsci.plugins.xunit.service.XUnitTransformer.invoke(XUnitTransformer.java:41)
      	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3078)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:212)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
      	at hudson.remoting.Request$2.run(Request.java:369)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:93)
      	at java.lang.Thread.run(Unknown Source)
      

      What is wrong? Is there a workaround for this problem? Will be a fixed released with a new plugin version?

        Attachments

          Activity

          hopeless - created issue -
          Hide
          nfalco Nikolas Falco added a comment -

          Please attach the report that causes the failure or will be impossible to reproduce and fix by me.

          Show
          nfalco Nikolas Falco added a comment - Please attach the report that causes the failure or will be impossible to reproduce and fix by me.
          hopeless - made changes -
          Field Original Value New Value
          Attachment Unit-Result.xml [ 42812 ]
          Hide
          hopeless - added a comment -

          I have attached the report "Unit-Result.xml"

          Show
          hopeless - added a comment - I have attached the report " Unit-Result.xml "
          nfalco Nikolas Falco made changes -
          Summary xUnit.Net-v2 (default) - ...plugins.xunit.exception.XUnitException: Conversion error: Cannot convert string "" to a double xUnit.Net v2 parse error when time attribute is missing
          nfalco Nikolas Falco made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Nikolas Falco
          Path:
          src/main/java/org/jenkinsci/plugins/xunit/types/XUnitDotNet.java
          src/main/resources/org/jenkinsci/plugins/xunit/types/cpptestunit-2.0-to-junit.xsl
          src/main/resources/org/jenkinsci/plugins/xunit/types/ctest-to-junit.xsl
          src/main/resources/org/jenkinsci/plugins/xunit/types/fpcunit-1.0-to-junit.xsl
          src/main/resources/org/jenkinsci/plugins/xunit/types/mbunit-to-junit-4.xsl
          src/main/resources/org/jenkinsci/plugins/xunit/types/mstest-1.0-to-junit-1.0.xsl
          src/main/resources/org/jenkinsci/plugins/xunit/types/nunit-2.x-to-junit.xsl
          src/main/resources/org/jenkinsci/plugins/xunit/types/nunit-3.0-to-junit.xsl
          src/main/resources/org/jenkinsci/plugins/xunit/types/phpunit-1.0-to-junit-4.0.xsl
          src/main/resources/org/jenkinsci/plugins/xunit/types/qtestlib-5.0-to-junit-1.0.xsl
          src/main/resources/org/jenkinsci/plugins/xunit/types/unittest-1.1-to-junit.xsl
          src/main/resources/org/jenkinsci/plugins/xunit/types/xunitdotnet-2.0-to-junit-2.xsl
          src/main/resources/org/jenkinsci/plugins/xunit/types/xunitdotnet-2.0-to-junit.xsl
          src/test/java/org/jenkinsci/plugins/xunit/types/XUnitDotNetTest.java
          src/test/resources/org/jenkinsci/plugins/xunit/types/xunitdotnet/testcase1/result.xml
          src/test/resources/org/jenkinsci/plugins/xunit/types/xunitdotnet/testcase3/result.xml
          src/test/resources/org/jenkinsci/plugins/xunit/types/xunitdotnet/testcase4/input.xml
          src/test/resources/org/jenkinsci/plugins/xunit/types/xunitdotnet/testcase4/result.xml
          http://jenkins-ci.org/commit/xunit-plugin/2c18ed76cc2fc5aa06bbf919ad59627b1f0b6396
          Log:
          JENKINS-51797 xUnit.Net v2 parse error when time attribute is missing

          Fix junit time function when is time attribute is empty

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nikolas Falco Path: src/main/java/org/jenkinsci/plugins/xunit/types/XUnitDotNet.java src/main/resources/org/jenkinsci/plugins/xunit/types/cpptestunit-2.0-to-junit.xsl src/main/resources/org/jenkinsci/plugins/xunit/types/ctest-to-junit.xsl src/main/resources/org/jenkinsci/plugins/xunit/types/fpcunit-1.0-to-junit.xsl src/main/resources/org/jenkinsci/plugins/xunit/types/mbunit-to-junit-4.xsl src/main/resources/org/jenkinsci/plugins/xunit/types/mstest-1.0-to-junit-1.0.xsl src/main/resources/org/jenkinsci/plugins/xunit/types/nunit-2.x-to-junit.xsl src/main/resources/org/jenkinsci/plugins/xunit/types/nunit-3.0-to-junit.xsl src/main/resources/org/jenkinsci/plugins/xunit/types/phpunit-1.0-to-junit-4.0.xsl src/main/resources/org/jenkinsci/plugins/xunit/types/qtestlib-5.0-to-junit-1.0.xsl src/main/resources/org/jenkinsci/plugins/xunit/types/unittest-1.1-to-junit.xsl src/main/resources/org/jenkinsci/plugins/xunit/types/xunitdotnet-2.0-to-junit-2.xsl src/main/resources/org/jenkinsci/plugins/xunit/types/xunitdotnet-2.0-to-junit.xsl src/test/java/org/jenkinsci/plugins/xunit/types/XUnitDotNetTest.java src/test/resources/org/jenkinsci/plugins/xunit/types/xunitdotnet/testcase1/result.xml src/test/resources/org/jenkinsci/plugins/xunit/types/xunitdotnet/testcase3/result.xml src/test/resources/org/jenkinsci/plugins/xunit/types/xunitdotnet/testcase4/input.xml src/test/resources/org/jenkinsci/plugins/xunit/types/xunitdotnet/testcase4/result.xml http://jenkins-ci.org/commit/xunit-plugin/2c18ed76cc2fc5aa06bbf919ad59627b1f0b6396 Log: JENKINS-51797 xUnit.Net v2 parse error when time attribute is missing Fix junit time function when is time attribute is empty

            People

            • Assignee:
              nfalco Nikolas Falco
              Reporter:
              hopeless -
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: