I use NCover all day long in my coding. Especially right now, on one of my projects, I have a lot of uncovered code that I am refactoring. I am writing my tests first, and then getting the chain saw out.

A little background:

If you've seen me speak on Test Driven Development, you know that I am not a fanatic when it comes to code coverage numbers. 70% might be ok in one case, 90% might be too low in another. But it is a very important tool to use in any development effort. If you are using MSTest and VS2008, code coverage is built in. However, I prefer MbUnit, therefore I need another code coverage tool.

I've been using NCover v2 for quite a while. Typically command line (or Nant), but I do really like NCover Explorer. I keep it up on one of my monitors most of the work day. So, I'm familiar with how that version worked (or at least how it worked for me). One of the niceties was I could set up everything in the GUI, and then cut and paste the settings file/Nant scripts etc. Saved me a ton of time setting up or tweaking a new project.

I met Joe Feser (a Sr. Software Engineer for NCover) at CodeStock in Knoxville, TN where I was speaking, and we got to talking the product, how I used it, and what I would like to see in the next rev.

You can check their website for all of the new features, so I'm not going to go into them here.

Version 3.04 (Beta)

When they published the 4th beta, I jumped in, head first. If I was going to test this product, I wanted it to be THE version that I used. So, no VM, no separate machine. I installed it over v2.

My first look was not a positive one. Setting up my project settings from the GUI didn't work (it's now fixed in 3.05), but I didn't know the settings were invalid, just thought it was blowing up due to it's beta-ness. A quick email to support with stack trace, etc, and the first response I receive was "it's MbUnit's fault". (NOTE: Please read on - support has been wonderful, I think we just needed to bridge the gap of whether I was less than intelligent or not).

So, I created my own console app, plugged it in as a "test harness", saw what NCover was doing, and sent that new information to support. Ok, so maybe I'm not the typical user...

Almost an immediate response - they found the bug, and it's fixed, will be in the next version. Ok, I'm now sold on working with this version and the developers.

There are a few things that work differently than what I was used to.

Assemblies with no instrumentation (because I told NCover to ignore everything in them) still showed up in the coverage file. (These didn't in the previous version.) I've had a lot of communication with the developers, and after explaining why I wanted entire assemblies skipped, they are determining how best to accommodate that use case within their development stream.

MbUnit and some of the satellite assemblies were showing up in the coverage file. This has been resolved, and will also be released in 3.05.

The command line switches are a little bit different. Not a lot, but enough that you want to check your files to make sure they will work as expected.

The UI for NCover Explorer (nce) needs a lot of work. Some of the UI issues that I encountered (note: the development staff is eager to hear what issues the UI has. A very good sign):

Cyclomatic Complexity analysis. All I can say is YEA! Well, that's not entirely true. But my issue is more with the UI. I would like to see CC numbers in the code files in NCE along with visits and coverage results. I don't want to be switching windows back and forth.

There is now a statistics panel. This is cool. However, I would like to see this as another tab in the code windows than a separate container control. If I have both code and stats open at the same time, I can't really read either too well.

Projects. In v2, I have all of my projects accessible through a MRU list. When I select a project, it loads all of the settings for me, including loading up the coverage file. If there is a way to do that in the new version, I couldn't figure it out in the amount of time I am willing to spend. There was too much friction there.

Bottom line, there is much better data coming out of v3 than v2. Trending and Cyclomatic Complexity are just two of the new features that by themselves make it a worthwhile upgrade. The development staff has been great to work with. The coverage process itself is very quick. If you are a command line/Nant/CC developer, get the 3.0.5 beta when it gets released on 11/3/08. If you need the GUI (NCover Explorer) to run your coverage process, I would hold off a couple of revs. Certainly by the time it goes RTM the GUI will be fixed, and run (don't walk) to get the upgrade. There is that much more info available...

I'm not using MbUnit 3, there just aren't enough stable features (at least last time I looked), plus the rollback wasn't implemented. That and row test are the main reasons I use MbUnit over other frameworks. So, I'm not sure how it will work with the alpha.

Good stuff. I'll have to try the new NCover beta with MbUnit to see how it goes. There were some serious problems with an earlier version of NCover v2 (an internal error about sequence point mismatches). I think that might also have been fixed.