So my coco job is outputting a cobertura-report.xml file which to my understanding is not compatible with SonarQube Enterprise 9.5. The documentation says that I can upload to Generic Test Format. I see in some other posts that there are converters, but I haven’t seen one for my case. Does anyone know of a tool that can convert my cobertura report to a SonarQube friendly format like Generic Test?
I work on a C++ project built by MSVC and CMake and tests are written according to google tests.
The only option I found that matched the conditions above and worked for my case to get test coverage is using OpenCPPCoverage. It provides formats such as “Binary”, “Corbertura”, and “Html”.
So I have the same question, how I can convert my Corbertura test coverage result into a format readable by SonarQube? coverage-report.log (144.1 KB)
We’re also using Squish Coco with the same problem. Is there any more current solution? The XSLT is GPL’d so I don’t want to integrate it into our codebase, and I don’t want to download it every time, creating a dependency on GitHub availability.
I actually found a solution in the meantime, using the sonar.cxx plugin you can add coverage, even when using the sonar cfamily sensor, because the new version of sonar.cxx uses the file extensions from the cfamily one as well.
It is quite painful to use though (e.g. can’t handle relative paths in Cobertura XML). So maybe an official solution would be better still.