-
Bug
-
Resolution: Fixed
-
Major
-
Jenkins 2.19
junit 1.18
I'm using JUnitResultsArchive to record test results, and I'm seeing a weird bug where there are failures reported but the build is not marked unstable.
This is via Jenkins pipeline, and immediately after the step, I'm echoing the build result:
step([$class: 'JUnitResultArchiver', testResults: 'build/xunit.xml']) echo ">>> BUILD RESULT ${currentBuild.result}"
I can confirm that a test failed in that step, and the result printed is ">>> BUILD RESULT null"
This doesn't always happen - in some other runs, the result is UNSTABLE as expected.
- links to
I started to see this issue after upgrading to 1.22.x at my declarative pipeline. Ended up to revert to 1.21
our pipeline maven surefire test stages with test failure set to ignore, and use JUnit plugin at post always block to detect build failure state.
abayer , I think this is reproducible regression
post {
always {
//detect test failure
junit allowEmptyResults: true, testResults: '**/junitreports/.xml
}
success{
//this always gets called even with test failure in always block
sendEmail(config, 'SUCCESS', 'ecdm-mail')}
}
....
}