-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
Jenkins 2.19.2, JUnit 1.19
I have a Pipeline Job with parallel test executions, where every node executor submits own junit reports (obviously, because they are in different workspaces, it's hard to collect reports to one place).
First of all, it takes some time (up to 5 minutes) even after job is finished to collect/reflect reports on job's test reports page (:job_name/:build_number/testReport/). Rarely, it doesn't track report from some parallel job.
And it shows wrong (less) tests number on job's test result trend chart. Every build it shows different random number, however they are builds for the same revision.
My suggestion, is that Trend Test Result chart get's generated before all test results are collected.
Probably it's a consequence of asynchronous job test result collection, where it collects all reports even after job is finished.
My approximate workflow is:
node { stage('Preparation') { checkout scm stash 'workspace' } } stage('Run Tests') { def splits = splitTests parallelism: count(workersCount), generateInclusions: true def testGroups = [:] for (int i = 0; i < splits.size(); i++) { def index = i; def split = splits[index] node { //may be different workspace, so unstash unstash 'workspace' try { sh 'run_tests_here.sh' } finally { junit 'log/reports/*.xml' // clean reports, because next thread may be executed in the same workspace sh 'rm -f log/reports/*' } } } }
P.S. Probably my approach is wrong and I'd love to hear any suggestions.
My job can run in parallel within the same workspace, but `node` step dedicates new workspace automatically + nodes may be on different machines, so gathering test reports afterward is even harder.
- duplicates
-
JENKINS-41134 failures in the windows build are ignored
- Resolved