This issue is archived. You can view it, but you can't modify it. Learn more

ExportXMLWordPrintable

      When running tests in parallel, the test is only shown once. Handling should be like in junit-plugin which adds the information of enclosing blocks to the test result.

      e.g.:

      pipeline {
       agent none
      
       stages {
        stage('test') {
         parallel {
          stage('a') {
           agent any
           steps {
            writeFile encoding: 'UTF-8', file: 'test.xml', text: '''<?xml version="1.0" encoding="UTF-8"?>
      <testsuite name="some.pkg.SomeTest" tests="1" skipped="0" failures="0" errors="0" timestamp="2017-12-15T08:59:16" hostname="foo" time="1.0">
      <properties/>
      <testcase name="shouldTestSomething" classname="some.pkg.SomeTest" time="1.0"/>
      </testsuite>
      '''
           junit allowEmptyResults: true, keepLongStdio: true, testResults: 'test.xml'
           }
          }
      
          stage('b') {
           agent any
      
           steps {
            writeFile encoding: 'UTF-8', file: 'test.xml', text: '''<?xml version="1.0" encoding="UTF-8"?>
      <testsuite name="some.pkg.SomeTest" tests="1" skipped="0" failures="0" errors="0" timestamp="2017-12-15T08:59:16" hostname="foo" time="1.0">
      <properties/>
      <testcase name="shouldTestSomething" classname="some.pkg.SomeTest" time="1.0"/>
      </testsuite>
      '''
            junit allowEmptyResults: true, keepLongStdio: true, testResults: 'test.xml'
           }
          }
         }
        }
       }
      }

       

            Assignee:
            Varun Menon
            Reporter:
            Dietmar Scheidl
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: