Code Coverage

We are a TDD shop, or BDD to be more accurate. Normally we leverage Hudson Test Result Trend to see how things are doing. The project is a Windows NT Service. This is how Test trend looks like:

image

I wanted to take the current project and to run code coverage on it, to see if our approach is still holding and how things look like. It was around 90%, and with a few missing specs results were quite good:

image

A few things that I have observed and have to be mentioned:

1. Small projects are easy to keep under control.

2. It is difficult to get to 100% – is there a need at all? Don’t think so.

3. Having no UI to test does make things look a lot better.

4. Without code coverage things still can be done properly. Yet, it is nice to have statistics.

5. Some of the web stuff .NET has is too kinky to test properly, but it’s possible.

 

As for the Coverage tools – I’ve used trial version of NCover and a college of mine used PartCover. Are there any alternatives? Recommendations?

No Comments