I'm in the process of migrating our old Jenkins build to a declarative pipeline. We use the xUnit plugin to publish unit tests and for JUnit the following works just fine:
step([$class: 'XUnitBuilder',
thresholds: [[$class: 'FailedThreshold', unstableThreshold: '1']],
tools: [[$class: 'JUnitType', pattern: '**/surefire-reports/*.xml'],
[$class: 'JUnitType', pattern: '**/generatedJUnitFiles/JUnit/*.xml'],]
])
My problem is that I cannot figure out how to publish our boost tests. Is there a BoostType
similar to JUnitType
, or are boost tests not supported yet?
Other plugins as an extension of the xUnit plugin:Gallio (Gallio plugin) Parasoft C++Test tool (Cpptest Plugin) JSUnit (JSUnit Plugin) JBehave.
The new xunit Plugin syntax is a bit lighter and more readable:
pipeline {
agent any
stages {
stage('Test'){
steps {
sh "run_tests.bash"
}
}
}
post {
always{
xunit (
thresholds: [ skipped(failureThreshold: '0'), failed(failureThreshold: '0') ],
tools: [
JUnit(pattern: '**/surefire-reports/*.xml'),
JUnit(pattern: '**/generatedJUnitFiles/JUnit/*.xml'),
BoostTest(pattern: '**/*_results.xml')]
)
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With