Roy Osherove

View Original

Test Review #1 - NerdDinner

I’ve decided to start doing some test reviews of tests that I see in the wild. I figured it’s the best way to show people what I mean when I say they do not have readable, maintainable or trustworthy tests.

The first episode is the review of the tests from the NerdDinner MVC source code. It’s 30 minutes long. and it was shot at 2AM, so I’m quite cranky. But the tests sure don’t try to ease my mind, and only make me crankier.

If you have tests you’d like me to review send an email to Roy AT osherove.com with the subject “Test Review [project name]”

TestReviewNerdDinner.flv

 

problems that are dealt with in this video:

  • Naming conventions
  • Magic strings in tests
  • Hard coded values in hand written stubs
  • Magic assertions (expecting a value that no one understand why it should be that value)
  • Lack of tests