lundi 2 mars 2015

Using Visual Studio to do Code Coverage on gtest unit tests for native VS C++

Friends,


I have been looking at unit test code coverage tools for the last 2 weeks, evaluating them for our specific needs. The last one I would like to evaluate is Visual Studio's own code coverage for native C++ unit tests. In our solution, we have the following:



  • full Visual Studio 2013 development environment with large projects of multi-100 k lines of code

  • 900+ unit tests already written in GTEST (working and executing in the build process) and working in this environment native C++ code (unmanaged)

  • a dozen projects in the solution or so


What I am trying to do is figure out



  • If I can use the Visual Studio code coverage Analysis tool to report results on my gtest unit tests

  • get code coverage results generated each time the unit tests or run (our unit tests are automatically run in a post-build step)


I have looked around these forums, MSDN and other sites (like stackoverflow) and I can't find a good source of guidance to making this combination of tools work. As I say, I have the solution, projects and unit tests running and working well, but to add code coverage I am not seeing how to do so using Microsoft's own Visual Studio code coverage.


I have already evaluated a few other packages like Software Verify, Semantic Designs, OpenCPPCoverage and Bullseye. I was hoping to try our Visual Studio's code coverage component since it is already part of our dev environment, but I can't seem to figure out how or if that will work.


Any help?


Thanks for any feedback, info you can give.


Aucun commentaire:

Enregistrer un commentaire