I'm looking for a good .Net code coverage alternative to NCover (insufficient .Net 3.5 coverage and now pay-for) or VSTS (way too expensive).
We currently test with NUnit, but could switch to something with a similar 'layout' for its text fixtures if it were better integrated.
You can use PartCover [1] (free)
This is analog for NCover application, but have some advantages. It specifies which assemblies and classes you want to report and can work not only assemblies that have debug symbols.
UPDATE: PartCover [2] is now only supported on its GitHub fork
UPDATE 2: OpenCover [3] is now the current latest supported iteration.
[1] http://sourceforge.net/project/showfiles.php?group_id=175733A valid alternative to NCover these days is JetBrains dotCover [1] This is especially true if you're using ReSharper test runner as dotCover integrates nicely into it.
[1] http://www.jetbrains.com/dotcover/I've used PartCover [1]. The last time I checked, though, PartCover didn't support running code coverage metrics in an ASP.NET hosted app, which is quite a big drawback imho. But for measuring code coverage when unit testing domain logic, PartCover does the job well.
[1] http://sourceforge.net/projects/partcover/SharpDevelop has an integrated Nunit runner and Code Coverage toolset. I highly recommend it as an alternative. Oh, and it is open source: http://sharpdevelop.codeplex.com/ Also, it works with .net 3.5 and all that jazz...
Have you checked out the full featured NCover 3.0 that's free for devs? All you have to do is pick up the support (which is still a bargain).
I know the developers of NCover and there's some cool stuff coming down the pipe (4.0 in a few months I think...)
[1] http://www.ncover.com/we%5Flove%5FdevsTestDriven.net is fairly cheap and they give out a free personal license (i.e. it's pretty liberally licensed). http://www.testdriven.net/
It comes with NCoverExplorer built-in and integrates nicely into Visual Studio. It supports pretty much every Unit testing framework in addition to NUnit.
I use NCover community edition [1] (version 1.5.8) which is completely free, at least as far as I can tell. Direct link to download [2].
[1] http://www.ncover.com/download/communityThey haven't been updating as regularly as they used to but TestMatrix at http://www.exactmagic.com/products/testmatrix/index.html is a good tool. You can export reports to excel and with a few excel macros get some decent data extracted (though I admit the experience could be smoother).
I've not tried automating it in a build environment and if that's your goal you might want to see how that scenario plays out but it does work with both nUnit and MS Test (so if you ever find enough reason to move to TFS you are covered). Like the VSTS coverage tool it integrates with the Visual Studio IDE nicely highlighting code line by line. Better than VSTS it allows right click running of tests on the actual lines of code of the test itself; highlighting the region and showing a tooltip with a success report or exception details. Plus there's a time in method profiler stuck in there as well.
All in all a great IDE experience and worth a look - but again if build automation is an end goal you'll need to check that out.
I'm not sure about the coverage, but there is a free version of NCover which is a version before NCoverExplorer, and we're still using that - it's available on the NCover site still.
That said, if you could elaborate on what is not covered by its coverage I'd be interested in hearing about that too!
It's worth mentioning that the old (free) NCover is available at Sourceforge.
Our Semantic Designs Test Coverage tool for C# [1], handes C# 2.0, 3.0 (all features including lambdas and LINQ) and very soon 4.0. Handles very large systems with extremely low overhead. Intuitive graphical display of coverage data by coloring blocks of covered/uncoverd code; full report of coverage data down to the method level and summarized in larger elements such as classes and packages. Usable even in embedded development environments.
EDIT 3/30/2010 Now handles C# 4.0.
[1] http://www.semanticdesigns.com/Products/TestCoverage/CSharpTestCoverage.htmlThe NCover on SourceForge is not the Same NCover that the user is asking about. It has been unsupported for over 4 years.