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

Collect Launchable results from both Surefire and Failsafe #1922

Merged
merged 1 commit into from
Mar 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def mavenEnv(Map params = [:], Closure body) {
body()
}
}
if (junit(testResults: '**/target/*-reports/TEST-*.xml').failCount > 0) {
if (junit(testResults: '**/target/surefire-reports/TEST-*.xml,**/target/failsafe-reports/TEST-*.xml').failCount > 0) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Being more explicit that these are the only two supported test runners (for example, we do not support TestNG), and also matching the CloudBees-internal version of this code for consistency.

// TODO JENKINS-27092 throw up UNSTABLE status in this case
error 'Some test failures, not going to continue'
}
Expand Down Expand Up @@ -78,7 +78,7 @@ lines.each {line ->
sh 'mv megawar-$LINE.war megawar.war && bash pct.sh'
}
def launchableSession = readFile("launchable-session-${line}.txt").trim()
launchable("record tests --session ${launchableSession} maven './**/target/surefire-reports'") // TODO add failsafe reports
launchable("record tests --session ${launchableSession} maven './**/target/surefire-reports' './**/target/failsafe-reports'")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Launchable CLI Maven test recorder implicitly adds TEST-*.xml as a suffix, so it is not needed here. It does not support comma-separated Ant-style globbing, but it does support multiple source roots as space-separated positional arguments.

}
}
}
Expand Down