jenkinsci / jenkinsci/junit-plugin
Despite of a failed test sometimes the junit upload does not trigger the post/unstable action
- Dominant language
- Java
- Stars
- 87
- Forks
- 351
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 2
Description
### Version report
Jenkins and plugins versions report:
Jenkins: 2.289.3
OS: Windows Server 2016 - 10.0
---
ace-editor:1.1
active-directory:2.25
allure-jenkins-plugin:2.29.0
antisamy-markup-formatter:2.5
apache-httpcomponents-client-4-api:4.5.13-1.0
artifact-repository:1.3.0
authentication-tokens:1.4
blueocean:1.25.2
blueocean-autofavorite:1.2.4
blueocean-bitbucket-pipeline:1.25.2
blueocean-commons:1.25.2
blueocean-config:1.25.2
blueocean-core-js:1.25.2
blueocean-dashboard:1.25.2
blueocean-display-url:2.4.1
blueocean-events:1.25.2
blueocean-git-pipeline:1.25.2
blueocean-github-pipeline:1.25.2
blueocean-i18n:1.25.2
blueocean-jwt:1.25.2
blueocean-personalization:1.25.2
blueocean-pipeline-api-impl:1.25.2
blueocean-pipeline-editor:1.25.2
blueocean-pipeline-scm-api:1.25.2
blueocean-promote-link:1.4.2
blueocean-rest:1.25.2
blueocean-rest-impl:1.25.2
blueocean-web:1.25.2
bootstrap4-api:4.6.0-3
bootstrap5-api:5.1.3-3
bouncycastle-api:2.20
branch-api:2.7.0
caffeine-api:2.9.2-29.v717aac953ff3
checks-api:1.7.2
cloudbees-bitbucket-branch-source:734.v2f848c5e6ea2
cloudbees-folder:6.16
command-launcher:1.2
credentials:2.6.1
credentials-binding:1.27
display-url-api:2.3.5
docker-commons:1.17
docker-workflow:1.26
durable-task:493.v195aefbb0ff2
echarts-api:5.2.2-1
email-ext:2.85
embeddable-build-status:2.0.3
external-monitor-job:1.7
favorite:2.3.3
font-awesome-api:5.15.4-4
git:4.10.0
git-client:3.10.0
git-server:1.10
github:1.34.1
github-api:1.301-378.v9807bd746da5
github-branch-source:2.11.3
gradle:1.37.1
handlebars:3.0.8
handy-uri-templates-2-api:2.1.8-1.0
htmlpublisher:1.28
http_request:1.12
jackson2-api:2.13.0-230.v59243c64b0a5
jaxb:2.3.0
jdk-tool:1.0
jenkins-design-language:1.25.2
jjwt-api:0.11.2-9.c8b45b8bb173
jquery3-api:3.6.0-2
jsch:0.1.55.2
junit:1.53
lockable-resources:2.12
mailer:1.34
matrix-auth:2.6.9
matrix-project:1.19
momentjs:1.1.1
monitoring:1.88.0
nunit:0.27
okhttp-api:4.9.3-105.vb96869f8ac3a
pipeline-build-step:2.15
pipeline-graph-analysis:1.11
pipeline-input-step:2.12
pipeline-milestone-step:1.3.2
pipeline-model-api:1.9.3
pipeline-model-definition:1.9.3
pipeline-model-extensions:1.9.3
pipeline-rest-api:2.19
pipeline-stage-step:2.5
pipeline-stage-tags-metadata:1.9.3
pipeline-stage-view:2.19
pipeline-utility-steps:2.11.0
plain-credentials:1.7
plugin-util-api:2.6.0
popper-api:1.16.1-2
popper2-api:2.10.2-1
pubsub-light:1.16
rocketchatnotifier:1.4.10
scm-api:2.6.5
script-security:1.78
snakeyaml-api:1.29.1
sse-gateway:1.24
ssh-credentials:1.19
ssh-slaves:1.33.0
sshd:3.1.0
structs:308.v852b473a2b8c
test-results-analyzer:0.3.5
tfs:5.157.1
thinBackup:1.10
timestamper:1.15
token-macro:267.vcdaea6462991
trilead-api:1.0.13
variant:1.4
versioncolumn:2.2
workflow-aggregator:2.6
workflow-api:2.47
workflow-basic-steps:2.24
workflow-cps:2640.v00e79c8113de
workflow-cps-global-lib:2.21
workflow-durable-task-step:2.40
workflow-job:2.42
workflow-multibranch:2.26
workflow-scm-step:2.13
workflow-step-api:2.24
workflow-support:3.8
Window Server 2016 (controller), Server 2019 (agents)
### Reproduction steps
pipeline {
agent {
label 'master'
}
options {
skipStagesAfterUnstable()
}
stages {
parallel {
stage('Stage with Problem') {
agent { label "some-agent" }
steps {
echo "Write some xxx.junit.xml"
}
post {
always {
junit skipPublishingChecks: true, testResults: '**/*.junit.xml', allowEmptyResults: true
}
success {
}
unstable {
echo "Stage unstable"
}
failure {
echo "Stage failure"
}
aborted {
echo "Stage aborted"
}
}
}
stage('Other stage') {
agent { label "some-agent" }
steps {
echo "No Problem detected"
}
}
}
}
stage('Success action') {
steps {
echo "Copy some File"
}
}
}
post {
always {
}
success {
}
unstable {
}
failure {
}
}
}
### Results
Expected result:
If junit logs any test as failed, this should get hit always
post / unstable {
echo "Stage unstable"
}
[junit.txt](https://github.com/jenkinsci/junit-plugin/files/7661643/junit.txt)
Actual result:
post / unstable is not hit, but stage('Succes action') is. Build (testReport) these errors ar reported. The failing stage is marked as instable, the build is marked as instable, but still the stage('Success Action') gets trigged. But the post/unstable ist not hit.
It looks like this code (german) ist triggered:
[2021-12-05T15:00:57.064Z] Zeichne Testergebnisse auf.
[2021-12-05T15:00:57.078Z] Testergebnisberichte enthalten keine Testergebnisse.
[2021-12-05T15:00:57.079Z] Keine JUnit-Testergebnisse gefunden. Liegt vielleicht ein Konfigurationsfehler vor?
Contributor guide
Assessment
This issue has not been assessed yet.