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

xUnit should not consider report generated by other xUnit step

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      node('master') {
          stage('1') {
              step([$class: 'XUnitBuilder',
                            thresholds: [[$class: 'FailedThreshold', failureThreshold: "1"]],
                             tools: [[$class: 'JUnitType', pattern: "tmp.xml"]]])
          }
          stage('2') {
              step([$class: 'XUnitBuilder',
                            thresholds: [[$class: 'FailedThreshold', failureThreshold: "0"]],
                             tools: [[$class: 'JUnitType', pattern: "tmp2.xml"]]])       
          }
      }
      

      tmp.xml contains one failure and tmp2.xml contains no failures.

       

      The result is as followed:

      [test_pipeline] Running shell script
      [Pipeline] step
      [xUnit] [INFO] - Starting to record.
      [xUnit] [INFO] - Processing JUnit
      [xUnit] [INFO] - [JUnit] - 1 test report file(s) were found with the pattern 'tmp.xml' relative to '/var/lib/jenkins/workspace/test_pipeline' for the testing framework 'JUnit'.
      [xUnit] [INFO] - Check 'Failed Tests' threshold.
      [xUnit] [INFO] - Setting the build status to SUCCESS
      [xUnit] [INFO] - Stopping recording.
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] stage
      [Pipeline] { (2)
      [Pipeline] sh
      [test_pipeline] Running shell script
      [Pipeline] step
      [xUnit] [INFO] - Starting to record.
      [xUnit] [INFO] - Processing JUnit
      [xUnit] [INFO] - [JUnit] - 1 test report file(s) were found with the pattern 'tmp2.xml' relative to '/var/lib/jenkins/workspace/test_pipeline' for the testing framework 'JUnit'.
      [xUnit] [INFO] - Check 'Failed Tests' threshold.
      [xUnit] [INFO] - The total number of tests for this category exceeds the specified 'failure' threshold value.
      [xUnit] [INFO] - Setting the build status to FAILURE
      [xUnit] [INFO] - Stopping recording.
      

      Xunit keeps track of previous recorded failures, while it, in my opinion, should not

        Attachments

          Issue Links

            Activity

            roel0 roel postelmans created issue -
            abayer Andrew Bayer made changes -
            Field Original Value New Value
            Component/s pipeline-model-definition-plugin [ 21706 ]
            abayer Andrew Bayer made changes -
            Assignee Andrew Bayer [ abayer ]
            nfalco Nikolas Falco made changes -
            Assignee Nikolas Falco [ nfalco ]
            nfalco Nikolas Falco made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            nfalco Nikolas Falco made changes -
            Summary Can't have a different failure threshold with xunit per stage xUnit should not consider report generated by other xUnit step
            nfalco Nikolas Falco made changes -
            Status In Progress [ 3 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            nfalco Nikolas Falco made changes -
            Link This issue is duplicated by JENKINS-38530 [ JENKINS-38530 ]
            nfalco Nikolas Falco made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            nfalco Nikolas Falco made changes -
            Status Reopened [ 4 ] In Progress [ 3 ]
            nfalco Nikolas Falco made changes -
            Status In Progress [ 3 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]

              People

              • Assignee:
                nfalco Nikolas Falco
                Reporter:
                roel0 roel postelmans
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: