Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some Junit test results are randomly being dropped #459

Open
armaanPy opened this issue Nov 17, 2022 · 2 comments
Open

Some Junit test results are randomly being dropped #459

armaanPy opened this issue Nov 17, 2022 · 2 comments
Labels

Comments

@armaanPy
Copy link

Jenkins and plugins versions report

Plugins
JUnit Plugin - v1.29

What Operating System are you using (both controller, and any agents involved in the problem)?

Controller - Linux (amd64)
Agent(s) - Windows 10 (amd64)

Reproduction steps

  1. Step 1: Run 14 tests in Jenkins in parallel shared across 9 Windows agents.
  2. Step 2: All of the 14 tests generate an XML file which is successfully stashed.
  3. Step 3: Post build, unstash the XML files,
  4. Step 4: Execute the Junit test archive command with:
    junit allowEmptyResults: false, testResults: '**\\*.xml'

Expected Results

I expect to see 14 test results at all time.

Actual Results

This is random, on some occasions I see all 14 test results output to Jenkins, and on other occasions I only see 13 or 12.

Anything else?

We are currently running JUnit plugin v.129 on Jenkins, I am not certain if my issue is related to https://issues.jenkins.io/browse/JENKINS-48583, therefore I raised this issue.

@armaanPy armaanPy added the bug label Nov 17, 2022
@timja
Copy link
Member

timja commented Nov 17, 2022

Please provide a minimal reproduce able test case.

A pipeline that can reproduce this would likely be most appropriate

@armaanPy
Copy link
Author

armaanPy commented Nov 17, 2022

@timja Apologies for the formatting, but I am running something like this. We are currently running JUnit plugin v.129 on Jenkins, I am not certain if my issue is related to https://issues.jenkins.io/browse/JENKINS-48583.

pipeline {
agent {
node {
label "Win"
}
}
stages {
stage('Tests') {
parallel {
stage('Test1') {
agent {
node {
label "Windows && aws && r5.2xlarge"
}
}
steps {
dir('TestLab') {
script {
final runTest1 = runSingleTest("Test1", "Test1.xml", "Test1.log")
bat """
${runTest1}
"""
}
stash allowEmpty: false, includes: "Test1.xml", name: "Test1-XML"
cleanWs()
}
}
}
stage('Test2') {
agent {
node {
label "Windows && aws && r5.2xlarge"
}
}
steps {
dir('TestLab') {
script {
final runTest2 = runSingleTest("Test2", "Test2.xml", "Test2.log")
bat """
${runTest2}
"""
}
stash allowEmpty: false, includes: "Test2.xml", name: "Test2-XML"
cleanWs()
}
}
}
stage('Test3') {
agent {
node {
label "Windows && aws && r5.2xlarge"
}
}
steps {
dir('TestLab') {
script {
final runTest3 = runSingleTest("Test3", "Test3.xml", "Test3.log")
bat """
${runTest3}
"""
}
stash allowEmpty: false, includes: "Test3.xml", name: "Test3-XML"
cleanWs()
}
}
}
}
post {
always {
dir('XML_Outputs') {
unstash 'Test1-XML'
unstash 'Test2-XML'
unstash 'Test3-XML'
junit allowEmptyResults: false, testResults: '**\*.xml'
}
cleanWs(
cleanWhenAborted: true,
cleanWhenFailure: true,
cleanWhenSuccess: true,
cleanWhenUnstable: true,
)
}
}
}
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants