CandlesOfThe
CandlesOfThe

Reputation: 23

How do I enable code coverage in Visual Studio 2005?

I have looked at this question; Why don't I get code coverage results for C++/CLI project in Visual Studio 2010? and the F1 page, but that doesn't help me much. I have set the profiling on and rebuilt, but I can't find the 'Data and Diagnostics' page, or see anything which resembles a coverage data file in the project folder.

What I am trying to do get an equivalent to 'gcov' on a Linux platform, get a chart of how much code is being missed by the test suite.

I'm using Visual Studio 2005 Professional Edition and UnitTest++ as the test framework. Any help would be most welcome.

Upvotes: 2

Views: 653

Answers (1)

Steve Gilham
Steve Gilham

Reputation: 11277

For VS 2005 (or 2008, for that matter) you can use the free nCover 1.5.8 version to get line coverage information.

Apart from that, real coverage tools for .net seem to be premium content (where they haven't been abandoned entirely like Clover.net); only do line coverage using the profiling APIs for pre-.net 4 (nCover free, PartCover); or rely on rewriting the IL with what are in effect trace statements one per code-point.

Upvotes: 1

Related Questions