Episode 11: Unit Testing Patterns

Published: Sept. 17, 2007, midnight

Guest: Gerard Meszaros

\n

Host: Martin Lippert

\n\n

Perhaps the greatest contribution of the agile methods community\n to software development has been the practice of automated unit\n testing: the writing of tests by programs that help to specify,\n document, and verify the code in our systems. Automated unit tests\n make possible other practices, such as refactoring and collective\n code ownership, and they help us to ensure a high-level of qaulity\n in our product.

\n\n

Tests are great, but we must keep in mind that they are code, too.\n The test suite grows over time, and without care we can run into\n the same sort of problems with our tests that we encounter in our\n code. Unlike production code, however, our tests sometimes feel\n optional, in that the team might think it can stop writing and\n maintaining tests when the perceived costs begin to exceed the\n perceived benefits.

\n\n

Gerard Meszaros, a developer and consultant with 25 years experience\n in software and a nearly a decade of experience in agile methods,\n wants to help teams avoid this calamity. He has documented his\n understanding of unit test suites in a comprehensive set of patterns\n for writing, monitoring, and maintaining test code.\n

\n\n

In this regard, Meszaros will teach an ooPSLA\n tutorial, titled\n \n Unit Test Patterns and Smells:\n Improving Test Code and Testability Through Refactoring.\n This tutorial, presented as a case study, teaches the best practices\n -- and "not so best practices" -- of unit testing as a set of patterns\n and as a set of smells for recognizing when the suite is going astray.\n

\n\n

Listen to this podcast to hear Martin Lippert of SE Radio talk\n with Gerard about unit testing, the Nunit family of automated\n test frameworks, and how to keep your test suites as clean and\n valuable to you as your production code.