• Blue Ocean 1.2, Blue Ocean 1.3, Blue Ocean 1.4 - beta 1, Blue Ocean 1.4 - beta 3, Blue Ocean 1.4 - beta 2

      Scope

      • Prefix the test name with the Path to the stage or parallel the test was run in
      • This should have a unit test (at least)
      • Check that the sort works correctly and the failures on the same "path" are grouped

      Note
      There are other ways of displaying this data except they will all need some design work done. We don't have the capacity for this, so we will do the minimum here.

      Example

      Jenkinsfile

      stage ('Browser Tests') {
        parallel {
          stage ('Firefox') {
            sh 'mvn test'
          }
          stage ('Chrome') {
            sh 'mvn test'
          }
          stage ('Safari') {
            sh 'mvn test'
          }
          stage ('Internet Explorer') {
            sh 'mvn test'
          }
        }
      }
      

          [JENKINS-46166] Distingush tests by stage and parallel

          James Dumay created issue -
          James Dumay made changes -
          Epic Link New: JENKINS-43952 [ 181484 ]
          James Dumay made changes -
          Description Original: *Scope*
          * Prefix the test name with the Path to the stage or parallel the test was run in

          *Example*
          !stage-parallel-tests.png|thumbnail!

          *Jenkinsfile*
          {code}
          stage ('Stage') {
            parallel {
              stage ('Firefox') {
                sh 'mvn test'
              }
              stage ('Chrome') {
                sh 'mvn test'
              }
              stage ('Safari') {
                sh 'mvn test'
              }
              stage ('Internet Explorer') {
                sh 'mvn test'
              }
            }
          }
          {code}
          New: *Scope*
          * Prefix the test name with the Path to the stage or parallel the test was run in
          * This should have a unit test (at least)
          * Check that the sort works correctly

          *Example*
          !stage-parallel-tests.png|thumbnail!

          *Jenkinsfile*
          {code}
          stage ('Stage') {
            parallel {
              stage ('Firefox') {
                sh 'mvn test'
              }
              stage ('Chrome') {
                sh 'mvn test'
              }
              stage ('Safari') {
                sh 'mvn test'
              }
              stage ('Internet Explorer') {
                sh 'mvn test'
              }
            }
          }
          {code}
          James Dumay made changes -
          Attachment Original: stage-parallel-tests.png [ 39253 ]
          James Dumay made changes -
          Attachment New: stage-parallel-tests.png [ 39254 ]
          James Dumay made changes -
          Description Original: *Scope*
          * Prefix the test name with the Path to the stage or parallel the test was run in
          * This should have a unit test (at least)
          * Check that the sort works correctly

          *Example*
          !stage-parallel-tests.png|thumbnail!

          *Jenkinsfile*
          {code}
          stage ('Stage') {
            parallel {
              stage ('Firefox') {
                sh 'mvn test'
              }
              stage ('Chrome') {
                sh 'mvn test'
              }
              stage ('Safari') {
                sh 'mvn test'
              }
              stage ('Internet Explorer') {
                sh 'mvn test'
              }
            }
          }
          {code}
          New: *Scope*
          * Prefix the test name with the Path to the stage or parallel the test was run in
          * This should have a unit test (at least)
          * Check that the sort works correctly and the failures on the same "path" are grouped

          *Note*
          There are other ways of displaying this data except they will all need some design work done. We don't have the capacity for this, so we will do the minimum here.

          *Example*
          !stage-parallel-tests.png|thumbnail!

          *Jenkinsfile*
          {code}
          stage ('Stage') {
            parallel {
              stage ('Firefox') {
                sh 'mvn test'
              }
              stage ('Chrome') {
                sh 'mvn test'
              }
              stage ('Safari') {
                sh 'mvn test'
              }
              stage ('Internet Explorer') {
                sh 'mvn test'
              }
            }
          }
          {code}
          James Dumay made changes -
          Assignee New: Andrew Bayer [ abayer ]
          James Dumay made changes -
          Link New: This issue relates to JENKINS-27395 [ JENKINS-27395 ]

          Phil McArdle added a comment - - edited

          Came here from JENKINS-27395. This would work for me. All of the differences in my tests are already covered by stages so I'd just need to adapt the naming slightly.

          In your example, all four sets of failing tests are prefixed with 'Browser Tests', but I don't see where that's introduced in the pipeline script? Fixed.

          Is there any likelihood of getting a similar feature to this in the classic Jenkins Test Result pages? There are still a lot of features missing from the Blue Ocean view and I've not seen any comments that suggests that it'll get parity. Apologies if this is documented somewhere.

          Phil McArdle added a comment - - edited Came here from  JENKINS-27395 . This would work for me. All of the differences in my tests are already covered by stages so I'd just need to adapt the naming slightly. In your example, all four sets of failing tests are prefixed with 'Browser Tests', but I don't see where that's introduced in the pipeline script? Fixed. Is there any likelihood of getting a similar feature to this in the classic Jenkins Test Result pages? There are still a lot of features missing from the Blue Ocean view and I've not seen any comments that suggests that it'll get parity. Apologies if this is documented somewhere.

          Andrew Bayer added a comment -

          FYI, jamesdumay, I am going to have to make some changes in junit to support this - the way we're gathering currently is by FlowNode#id where the actual test report is gathered (i.e., in the upcoming junitResults and xunit steps), so either we need to change that to also record the enclosing block(s) in some form or we need to have Blue Ocean map from the leaf FlowNode to its enclosing blocks... I'm tending towards the former (tracking the enclosing blocks in the TestResult mapping to the SuiteResult) at least in part because it'd make supporting something in the classic UI doable.

          Andrew Bayer added a comment - FYI, jamesdumay , I am going to have to make some changes in junit to support this - the way we're gathering currently is by FlowNode#id where the actual test report is gathered (i.e., in the upcoming junitResults and xunit steps), so either we need to change that to also record the enclosing block(s) in some form or we need to have Blue Ocean map from the leaf FlowNode to its enclosing blocks... I'm tending towards the former (tracking the enclosing blocks in the TestResult mapping to the SuiteResult ) at least in part because it'd make supporting something in the classic UI doable.

            abayer Andrew Bayer
            jamesdumay James Dumay
            Votes:
            4 Vote for this issue
            Watchers:
            21 Start watching this issue

              Created:
              Updated:
              Resolved: