Using the C ++ unit testing platform using Visual Studio 2013 Professional, you can write unit tests and run them from the IDE, but to create coverage reports, you probably need to have a Premium or Ultimate version of Visual Studio.
Is it possible to get code coverage reports using a Professional publication, preferably without installing any third-party tools? If not, what alternatives exist for people who don’t use the more expensive IDE editions?
Note that you can generate coverage data using the command line tools, but I cannot find a way to look at the results. For reference, here are the steps for generating coverage statistics on the command line:
- Create code for testing with
/PROFILE linker switch - Run
vsinstr /coverage <binaryName> to process the code; make sure you are on the command line VS 2013 - Run
start vsperfmon -coverage -output:results to start the profiler - Run device tests
- Stop the profiler by running
vsperfcmd -shutdown
The above file will give you the results file. without being able to view it without Premium or Ultimate releases, as far as I know.
source share