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

[xUnit] Unexpected 'UNSTABLE' result with all unit tests passing

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • xunit-plugin
    • None
    • Jenkins 2.89.2
      xUnit plugin 1.102
      GoogleTest 1.8.0
      RHEL 6.6
      GCC 4.9

      xUnit has started marking builds as 'UNSTABLE' even though all unit tests passed.

      This is especially bewildering as the source code and tests have not changed, but Jenkinsfile and pipeline have been refactored to use a custom library for common steps - although not the step which publishes the results to Jenkins.  There are no indications of any other errors.

      In the "Pipeline Steps" page for the build, all steps including that containing xUnit are marked as "Success" (blue) – however in the raw Console Output xUnit can be seen marking the build as unstable:

      [xUnit] [INFO] - Processing GoogleTest-1.6
      [xUnit] [INFO] - [GoogleTest-1.6] - 1 test report file(s) were found with the pattern 'PROJECT_HOME/.logs/*.results' relative to 'WORKSPACE' for the testing framework 'GoogleTest-1.6'.
      [xUnit] [INFO] - Check 'Failed Tests' threshold.
      [xUnit] [INFO] - Check 'Skipped Tests' threshold.
      [xUnit] [INFO] - Setting the build status to UNSTABLE
      [xUnit] [INFO] - Stopping recording.

      The test results show all 59 tests passed, with no failures or skipped tests.

      The xUnit results are published from a non-parallel aggregation stage, and the command is a plain-old step defined the Jenkinsfile (pipeline DSL) and originally generated by the pipeline syntax tool:

      step ([
          $class:         'XUnitBuilder',
          testTimeMargin: '15000',
          thresholdMode:  2,
          thresholds: [
          [
              $class:                'FailedThreshold',
              failureNewThreshold:    '1',
              failureThreshold:      '10',
              unstableNewThreshold:   '1',
              unstableThreshold:      '1',
          ],[
              $class:                'SkippedThreshold',
              failureNewThreshold:   '50',
              failureThreshold:      '50',
              unstableNewThreshold:  '50',
              unstableThreshold:     '50',
          ]],
          tools: [
          [
              $class:                'GoogleTestType',
              deleteOutputFiles:     false,
              failIfNotNew:          false,
              pattern:               "PROJECT_HOME/.logs/*.results",
              skipNoTestFiles:       true,
              stopProcessingIfError: false,
          ]]
      ])

      This is probably something really trivial – but damned if I can see it at 5pm on a Friday...

       

            abayer Andrew Bayer
            simon_watts Simon Watts
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: