Realistically achieving high test coverage – MvcContrib
Since Eric Hexter and I started the MvcContrib project, we’ve mandated a high test coverage. If a patch comes without tests, we’d reject the patch.
Given that MvcContrib exists for the purpose of supplementing a presentation library, ASP.NET MVC, you might think it’s not possible to achieve such a high percentage.
If you were ever curious about how this is done, I invite you to take a look at the project. The project has 1058 tests at this point and the main MvcContrib.dll assembly has 99% test coverage.
As an aside, when code is test-driven, the test coverage naturally falls out of this.
By the way, Eric just released version 0.0.1.118 of MvcContrib to CodePlex.
Keep tabs on MvcContrib by following my feed: http://feeds.feedburner.com/jeffreypalermo
Yulp, 100% agree.
I’m currently on a project that was developed test-first and I implemented CC.NET & NCover to break the build if it drops below 90% code coverage. So far, this code works excellent. The problems always seem to pop up in the areas where the tests ARE NOT. Failing early and fast has proven to be a great benefit.