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

XUnit post-build actions cannot be saved

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • postbuild-task-plugin
    • Jenkins ver. 1.598 on Ubuntu 12.04

      Since updating a few minor versions to the latest I've noticed that when saving a Project's Configure page existing XUnit post-build actions get cleared and will not accept the values submitted.

      The config.xml for a working project has the following for the XUnit section:

      <xunit plugin="xunit@1.61">
        <types>
          <PHPUnitJunitHudsonTestType>
            <pattern>sstesting/logs/testsuite.xml</pattern>
            <skipNoTestFiles>false</skipNoTestFiles>
            <failIfNotNew>true</failIfNotNew>
            <deleteOutputFiles>true</deleteOutputFiles>
            <stopProcessingIfError>true</stopProcessingIfError>
          </PHPUnitJunitHudsonTestType>
        </types>
        <thresholds>
          <org.jenkinsci.plugins.xunit.threshold.FailedThreshold>
            <unstableThreshold></unstableThreshold>
            <unstableNewThreshold></unstableNewThreshold>
            <failureThreshold></failureThreshold>
            <failureNewThreshold></failureNewThreshold>
          </org.jenkinsci.plugins.xunit.threshold.FailedThreshold>
          <org.jenkinsci.plugins.xunit.threshold.SkippedThreshold>
            <unstableThreshold></unstableThreshold>
            <unstableNewThreshold></unstableNewThreshold>
            <failureThreshold></failureThreshold>
            <failureNewThreshold></failureNewThreshold>
          </org.jenkinsci.plugins.xunit.threshold.SkippedThreshold>
        </thresholds>
        <thresholdMode>1</thresholdMode>
      </xunit>
      

      If I edit an existing project or clone our template to a new Project this section gets replaced with:

          <xunit plugin="xunit@1.61">
            <types/>
            <thresholds>
              <org.jenkinsci.plugins.xunit.threshold.FailedThreshold>
                <unstableThreshold></unstableThreshold>
                <unstableNewThreshold></unstableNewThreshold>
                <failureThreshold></failureThreshold>
                <failureNewThreshold></failureNewThreshold>
              </org.jenkinsci.plugins.xunit.threshold.FailedThreshold>
              <org.jenkinsci.plugins.xunit.threshold.SkippedThreshold>
                <unstableThreshold></unstableThreshold>
                <unstableNewThreshold></unstableNewThreshold>
                <failureThreshold></failureThreshold>
                <failureNewThreshold></failureNewThreshold>
              </org.jenkinsci.plugins.xunit.threshold.SkippedThreshold>
            </thresholds>
            <thresholdMode>1</thresholdMode>
          </xunit>
      

      Our builds then fail because we require the test report to be written.

      The workaround is to edit the correct values back into config.xml on the Jenkins master server and reload the configuration. It seems like the web interface's interaction with the REST API is breaking for this particular post-build action.

      Any thoughts>

            Unassigned Unassigned
            alexclifford Alex Clifford
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: