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

Test Result Trend chart not showing on Multibranch Pipeline branch if last build has no test results

XMLWordPrintable

      I'm not sure if this is a problem in xUnit or pipeline multibranch plugin. Please reassign this as required.

      We've got a Multibranch Pipeline project and we upload various test results using the xUnit plugin. It's somewhat like this:

      stage("Reachable stage") {
          if (some condition)
              return; // Skip all subsequent stages. This appears to cause the problem.
      }
      stage("Potentially failing or unreachable stage") {
          try
          {
              // This might fail and abort consequent stages.
          }
          finally
          {   // We still want all tests and artifacts that we can get, but we only care for artifacts whose unit tests were executed.
              xunit testTimeMargin: '2000', thresholdMode: 1, thresholds: [skipped(failureNewThreshold: '0', failureThreshold: '0', unstableNewThreshold: '0', unstableThreshold: '0'), failed(failureNewThreshold: '0', failureThreshold: '0', unstableNewThreshold: '0', unstableThreshold: '0')], tools: [xUnitDotNet(deleteOutputFiles: true, failIfNotNew: false, pattern: 'unittests.xml', skipNoTestFiles: false, stopProcessingIfError: true)]
              archiveArtifacts artifacts: '...', defaultExcludes: false
              xunit testTimeMargin: '2000', thresholdMode: 1, thresholds: [skipped(failureNewThreshold: '0', failureThreshold: '0', unstableNewThreshold: '0', unstableThreshold: '0'), failed(failureNewThreshold: '0', failureThreshold: '0', unstableNewThreshold: '0', unstableThreshold: '0')], tools: [xUnitDotNet(deleteOutputFiles: true, failIfNotNew: false, pattern: 'boxtests.xml', skipNoTestFiles: false, stopProcessingIfError: true)]
          }
      }
      stage("Potentially unreachable stage") {
      }
      
      

      The trend chart shows up when builds fail with or without tests or succeed with tests, but the chart disappears when the build skips stages which record the tests. To be entirely honest, I'm not sure what the current behavior is exactly (it's inconsistent).

      This should be fixed. As long as there are test results in any builds at all, they should be displayed regardless of test results in the latest build.

            Unassigned Unassigned
            gl1koz3 Edgars Batna
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: