C++ code coverage


I am trying to figure out how to have code coverage data for C++ projects in the build. I am open to using any tool.
I tried Bullseye and it is not trivial to import the coverage data into team city.

I downloaded latest teamcity I think it is 9.0.1

Please suggest a tool which easily works with teamcity. Steps to integrate it in will be highly appriciated.


1 comment
Comment actions Permalink

Hi Shankar,

There is no C++ coverage tools support by TeamCity now. Please watch and vote for the related feature request.

As of now you can use one of the following approaches:
1) To display readable coverage reports in TeamCity UI you'll need to make your coverage tool to export reports in HTML format, pack them to zip archive, publish the archive as a build artifact, and register new custom tab. Please find details in Including Third Party Reports in the Build Results article.

2) Coverage data needs to be explicitly imported into TeamCity to be displayed in build statistics, and used in build failure conditions. For that your build script should parse XML report your tool provide, and extract values for total items, covered items, and resulted ratio. Then they should be send to TeamCity by service messages.

Please feel free to create new feature requests to support other code coverage tools in our tracker. Also you are welcome to develop TeamCity plugin and share it with other users.

Note: also results can be processed and presented by SonarQube. Please try TeamCity SonarQube plugin.

Message was edited by: Alina Mishina


Please sign in to leave a comment.