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

Build status set to failure when no test files exist if failure thresholds are set

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • xunit-plugin
    • Jenkins 2.289.3
      xunit-plugin 3.0.2

      In the case where no test files are found and a failure threshold is set, the build status is always set to failure, regardless of the skipNoTestFiles setting.

       

      Xunit pipeline configuration

      step([$class    : 'XUnitPublisher', testTimeMargin: '3000', thresholdMode: 2,
          thresholds: [
              [
                  $class              : 'FailedThreshold',
                  failureNewThreshold : '100',
                  failureThreshold    : '100',
                  unstableNewThreshold: '100',
                  unstableThreshold   : '100'
              ],
              [
                  $class              : 'SkippedThreshold',
                  failureNewThreshold : '100',
                  failureThreshold    : '100',
                  unstableNewThreshold: '100',
                  unstableThreshold   : '100'
              ]
          ],
          tools     : [
              [
                  $class               : 'GoogleTestType',
                  deleteOutputFiles    : true,
                  failIfNotNew         : false,
                  pattern              : '*.xml',
                  skipNoTestFiles      : true,
                  stopProcessingIfError: true
              ]
          ],
          sleepTime: 20
      ])
      

       

      Expected behavior

      If no test files are found, the build status should not be changed. This behavior was present in version 2.4.0.

      Actual behavior

      The build status is always set to failure when no test files are found, even if all build stages are passing.

       

            nfalco Nikolas Falco
            kabar42 Kent Barnett
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: