Automated Testing

As we’ve already discussed, agile software development has dramatically changed software construction through the widespread adoption of automated testing and refactoring. We looked at refactoring in Refactoring; in this section, we’ll cover testing.

Effective Automated Testing

There’s more to effective automated testing than simply automating your tests. To achieve maximum benefit, your tests need to satisfy the following goals:

Unambiguous pass/fail:

Each test outputs a single bit—pass or fail. No shades of gray, no qualitative output, no interpretation required. Just a simple yes or no.


No setup should be required before running a test. Before it runs, it sets up whatever environment it needs automatically, ...

Get Debug It! now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.