Free .NET Code Coverage Tool

I'm not a heavy Visual FoxPro user - although it is installed on my development machine - but I've often admired some of its capabilities. Although it doesn't mesh desperately closely with the general .NET architecture, it is a relatively powerful database development environment that can count some of the most loyal and vocal customers that I've ever encountered. It also boasts a powerful set of debugger tools, some of which aren't available in any of our other developer tools.

One such tool is support for logging of code coverage information, an area that's often overlooked in the software testing that many of us conduct on our applications. Code coverage gives you information on which lines of code have been executed and how long it took to execute them. It's of great benefit in larger code bases, since it's often difficult to be sure that every line of code (including all exception cases) have been properly exercised. Without code coverage, it's quite easy to ship an application containing large chunks that have never been run - a recipe for bugs and application failure. Some code coverage tools also offer profiling capabilities to establish which code is executed the most regularly: these routines are of course fertile ground for performance tuning.

We use code coverage extensively for many of our products - special code coverage builds are available during the development process that incorporate logging of this information for further analysis. But there's no built-in support in Visual Studio .NET for this feature, which is a pity.

To the rescue comes Stuart Richardson, one of my colleagues in the UK Solutions Development Centre, who's put together a tool that performs code coverage on .NET assemblies written in any language (it operates at the IL level). You can automate the tool via batch files, or as part of the build process using the new MSBuild engine that will ship in Whidbey. If you've got symbols and source available, the tool offers code colouring so you can see what has been executed.

In summary, it's well worth grabbing this tool from GotDotNet and using it as part of your own development / testing process - you may be surprised at what you find!

Comments (5)

  1. Anonymous says:

    Thanks…. I’ve been looking for one of these for a while. Oh BTW have you tried asking on the london dot net users group for bloggers?

  2. Anonymous says:

    Thanks Peter – I’ll try the London user group.

  3. Anonymous says:

    GotDotNet already hosts another code coverage tool: <a href="; title="NCover">NCover</a>.

  4. Anonymous says:


         I’m working as a TL and required code coverage tool to test .NET applications.  I feel this tool will be suitable for our requirement.

    Thanks & Regards



  5. Anonymous says:

    Was looking for a .Net code coverage tool. WIll surely help me a lot with my testing process.

Skip to main content