I have a C++ project where I use googletest (gtest) to write my unit tests. After all test executions I have a coverage report (generated with gcovr) and a JUnit test execution report generated with ctest. While the coverage report works, the test executions are not displayed in SonarCloud.
I have made the following attempts:
JUnit report with
"Generic Test Execution Report with
When I try to upload the JUnit report, it doesn’t even show me in the sonar-scanner log that the file is being processed. When I upload the dummy report, at least this log entry comes up
INFO: Sensor Generic Test Executions Report INFO: Parsing <HIDDEN_PATH>/dummy_report.xml INFO: Imported test execution data for 1 files INFO: Sensor Generic Test Executions Report (done) | time=5ms
Note: I’m using a “dummy report” since I’m not able to convert JUnit files into the generic test execution format. So here’s my bonus question: does anyone have a tip for me on how to generate my test execution report in a Sonar-friendly way, or at least how to convert my JUnit reports?