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.

Self-contained:

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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.