• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • xunit-plugin
    • None

      Somewhere between versions 1.102 and 2.3.4 xunit introduced a not-backward-compatible change to reading its config.

      Steps to reproduce:

      • Install xunit 1.102.
      • Add xunit to a job config, including a tool (such a GoogleTest).
      • Upgrade to xunit 2.3.4.
      • Run the job.

      Expected Result

      Job succeeds.

      Actual Result

      Job fails with:

      ERROR: Build step failed with exception
      java.lang.IllegalArgumentException: The tools section is required.
      	at org.jenkinsci.plugins.xunit.XUnitProcessor.<init>(XUnitProcessor.java:141)
      	at org.jenkinsci.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:170)
      	at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
      	at hudson.model.Build$BuildExecution.post2(Build.java:186)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
      	at hudson.model.Run.execute(Run.java:1835)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      Build step 'Publish xUnit test result report' marked build as failure
      

          [JENKINS-58222] xunit 2.3.4 fails to read xunit 1.102 configs

          Nikolas Falco added a comment -

          Yes, version 2.x is not compatible with 1.x. I had mark in the pom.xml 2.0.3 but maybe after refactoring I delete setting in 2.3.5 version for mistake. I will re add in 2.3.6.

          Nikolas Falco added a comment - Yes, version 2.x is not compatible with 1.x. I had mark in the pom.xml 2.0.3 but maybe after refactoring I delete setting in 2.3.5 version for mistake. I will re add in 2.3.6.

          Is there any way to upgrade jobs from 1.x to 2.x? Using an XSLT?

          Paul Vittorino added a comment - Is there any way to upgrade jobs from 1.x to 2.x? Using an XSLT?

          Nikolas Falco added a comment -

          Do you mean tranform the config.xml of a job 1.x to a job 2.x using an XSLT? If you mean that than yes why not. You should create your XSLT, stop jenkins, write a script to collect all jenkins job config.xml and perform the XLST transformation using some tools.

          All this procedure is unsupported.

          Nikolas Falco added a comment - Do you mean tranform the config.xml of a job 1.x to a job 2.x using an XSLT? If you mean that than yes why not. You should create your XSLT, stop jenkins, write a script to collect all jenkins job config.xml and perform the XLST transformation using some tools. All this procedure is unsupported.

          This error surfaced for me when upgrading from 2.4.0 to 3.0.1. Restoring to 2.4.0 solved the problem @ nfalco

           

          08:15:13 ERROR: Build step failed with exception
          08:15:13 java.lang.IllegalArgumentException: The tools section is required.
          08:15:13 	at org.jenkinsci.plugins.xunit.XUnitProcessor.<init>(XUnitProcessor.java:139)
          08:15:13 	at org.jenkinsci.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:204)
          08:15:13 	at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
          08:15:13 	at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:80)
          08:15:13 	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
          08:15:13 	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:803)
          08:15:13 	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:752)
          08:15:13 	at hudson.model.Build$BuildExecution.post2(Build.java:177)
          08:15:13 	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:697)
          08:15:13 	at hudson.model.Run.execute(Run.java:1932)
          08:15:13 	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          08:15:13 	at hudson.model.ResourceController.execute(ResourceController.java:97)
          08:15:13 	at hudson.model.Executor.run(Executor.java:429)
          08:15:13 Build step 'Publish xUnit test result report' marked build as failure
          

           

          Mikael Östberg added a comment - This error surfaced for me when upgrading from 2.4.0 to 3.0.1 . Restoring to 2.4.0 solved the problem @  nfalco   08:15:13 ERROR: Build step failed with exception 08:15:13 java.lang.IllegalArgumentException: The tools section is required. 08:15:13 at org.jenkinsci.plugins.xunit.XUnitProcessor.<init>(XUnitProcessor.java:139) 08:15:13 at org.jenkinsci.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:204) 08:15:13 at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123) 08:15:13 at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:80) 08:15:13 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) 08:15:13 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:803) 08:15:13 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:752) 08:15:13 at hudson.model.Build$BuildExecution.post2(Build.java:177) 08:15:13 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:697) 08:15:13 at hudson.model.Run.execute(Run.java:1932) 08:15:13 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 08:15:13 at hudson.model.ResourceController.execute(ResourceController.java:97) 08:15:13 at hudson.model.Executor.run(Executor.java:429) 08:15:13 Build step 'Publish xUnit test result report' marked build as failure  

          Felix Mueller added a comment -

          I experienced the same error, after upgrading to 3.0.1. We're using the Jenkins Job DSL for all our jobs. The Job DSL API Explorer of the XUnit Plugin shows no 'tools' section as the exception describes. Had to rollback to 2.4.0 which fixed the problem for now.

          Felix Mueller added a comment - I experienced the same error, after upgrading to 3.0.1 . We're using the Jenkins Job DSL for all our jobs. The Job DSL API Explorer of the XUnit Plugin shows no 'tools' section as the exception describes. Had to rollback to 2.4.0 which fixed the problem for now.

          Tobias added a comment -

          Add missing report type fixed it https://stackoverflow.com/a/32657950

          Tobias added a comment - Add missing report type fixed it  https://stackoverflow.com/a/32657950

            nfalco Nikolas Falco
            darrelvun Darrel Vuncannon
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: