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

Stage not marked unstable in pipeline when there are failed test cases

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • tap-plugin
    • None

      When there are failed Test cases, the TapPublisher reports:

      There are failed test cases. Marking build as UNSTABLE

      The pipeline run as a whole is indeed marked as unstable (orange exclamation mark on the upper left), but the stage is not (Stage 2 should be marked unstable).

      So when there are multiple stages, it's not possible to see, which one was has failed tests.

      I'm using this testpipeline:

      pipeline {
          agent any
          stages {
              stage('Stage 1') {
                  steps {
                      writeFile file: 'test1.tap', text: 'ok 1'
                  }
                  post {
                      always {
                          step $class: 'TapPublisher', testResults: 'test1.tap', planRequired: false
                      }
                  }
              }
              stage('Stage 2') {
                  steps {
                      writeFile file: 'test2.tap', text: 'ok 1\nnot ok 2'
                  }
                  post {
                      always {
                          step $class: 'TapPublisher', testResults: 'test2.tap', planRequired: false
                      }
                  }
              }
          }
      }
      

            kinow Bruno P. Kinoshita
            d2weber Douglas
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: