-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major
-
Component/s: 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
        }
      }
    }
  }
}