Wednesday, September 13, 2006

Serious Goodness on Testing, Coverage, Assertions, and Llamas

Eric Sink has a terrific article on unit testing and code coverage.  He nicely talks about the tools he uses, how he got a particular library project to 100% coverage, and why that's a good idea in some cases and not so good in others.

His section on using assertions is a particularly good read.  Assertions make good sense in a number of cases and Sink does a nice job of pointing out where.  (Lowy's Programming .NET Components, 2nd ed. lays out good info on that, as does the much older and still useful Writing Solid Code from Maguire.)

Sink's article also hits a couple good points: regression testing and why 100% code coverage isn't a panacea.  You still need good tests.

Check it out.  Like almost everything else he writes, this article's a good read.

(Actually, there are no llamas mentioned in Eric's article.  He's not hung up on them like this guy.)

Updated:  Fixed missing link to Eric’s article.  Ooops.  Sorry!


Anonymous said...

Perhaps I'm a little dense, but where in the world is the link to Sink?

Jim Holmes said...

No, you're not dense.

I'll blame Live Writer because I'm *positive* I put that link in there when I wrote the article.

It's updated now. Thanks for pointing it out!

Subscribe (RSS)

The Leadership Journey