I successfully run my unit test with google test in Jenkins, but I don\'t know how to show the .xml file generated by gtest. It is said that gtest satisfies the JUnit format
Jenkins has xunit plugin that converts googletest xml to junit format: https://plugins.jenkins.io/xunit/.
Example of pipeline
pipeline {
agent any
stages {
stage('Test'){
steps {
sh "run_tests.bash"
}
}
}
post {
always{
xunit (
thresholds: [ skipped(failureThreshold: '0'), failed(failureThreshold: '0') ],
tools: [ GoogleTest(pattern: 'reports/*.xml') ])
)
}
}
}
Other useful links: