testdriven.com Wrangling quality out of chaos

XUnit Test Patterns: Refactoring Test Code

08.22.2006 · Posted in Links

XUnit Test Patterns: Refactoring Test CodeAutomated unit tests (A.K.A. "developer tests") and functional tests (A.K.A. "customer tests") are a cornerstone of many agile development methods (such as eXtreme Programming). The availability of automated, self-checking tests allows developers to be much bolder in how they modify existing software. They allow a more evolutionary form of software development that support incremental delivery of functionality to the customer (motto: Deliver early; deliver often!) that speeds up user feedback and improves the quality (both "fitness for purpose" and "software quality") of the software being built. The techniques are also spreading to less agile development methods via the introduction of "Test Driven Development" as a less extreme process alternative.

Automated test are more repeatable than manual tests because they execute exactly the same way every time. They don’t forget things after long weekends and vacations. They don’t leave to work on other projects. They don’t get sick or run over by a bus.

Automated tests take a lot less effort to run than manual tests. As a result, they are more likely to be run often. The more often the better. Fully assimilated agile developers run their tests pretty well every time they save and compile their code. And any time they need a quick vote of confidence! The tests act as a comforting "safety net" that promises to catch the developer’s mistakes. This allows them to work more quickly and with less paranoia and that makes them more productive despite the extra effort involved in writing the tests.

The XUnit patterns site was assembled to catalog the good practices in xUnit test automation the author has encountered over the years. It came about as a result of discussions Gerard Meszaros and Shaun Smith about the testing techniques they found themselves using over and over again to solve particular xUnit test automation problems.

Author: Gerard Meszaros
Published: Addison-Wesley Professional, May 21, 2007
833 pages
link

  • del.icio.us
  • Digg
  • Google Bookmarks
  • Slashdot
  • StumbleUpon
  • Technorati
  • Twitter
Tags:

Comments are closed