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

xUnit sets build status incorrectly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • xunit-plugin
    • None
    • Jenkins 2.89.3, xUnit 1.102

      We are counting on the xUnit "Publish xUnit test report" post-build step to properly set the build status. The Failed Tests section has 4 inputs that let you set thresholds to set the build to either UNSTABLE or FAILED based on whether the Total number of Failed tests, or total number of New failures, exceeds the specified thresholds.

      There is something broken in the test of the number of failures against the specified threshold. A recent build has the number of actual failures < the specified threshold for Total, and the number of New failures (1) < the specified threshold for New (5). It set the build to failed anyway.

      It appears that whenever the number of New failed tests is positive, that is reported as a build failure even when that number is less than the specified threshold.

      00:17:17 [xUnit] [INFO] - Starting to record.
      00:17:17 [xUnit] [INFO] - Processing CppUnit-1.12.1 (default)
      00:17:18 [xUnit] [INFO] - [CppUnit-1.12.1 (default)] - 1 test report file(s) were found with the pattern '**/testResult.xml' relative to '/home/bnet/jenkins/workspace/Linux-integration-test' for the testing framework 'CppUnit-1.12.1 (default)'.
      00:17:18 [xUnit] [INFO] - Check 'Failed Tests' threshold.
      00:17:18 [xUnit] [INFO] - Check 'Skipped Tests' threshold.
      00:17:18 [xUnit] [INFO] - Setting the build status to FAILURE
      00:17:18 [xUnit] [INFO] - Stopping recording.
      

            nfalco Nikolas Falco
            zmi_johnschmitz John Schmitz
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: