Jeffrey Palermo (.com)

Sponsors

The Lounge

News

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
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


Posted 06-23-2008 12:47 AM by Jeffrey Palermo

[Advertisement]

Comments

Donn Felker wrote re: Realistically achieving high test coverage - MvcContrib
on 06-25-2008 10:53 AM

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.