Chapter 5. Testing

Testing, often referred to as quality assurance (QA), is one of the most important parts of the whole software-development process. Unfortunately, most of the time testing gets the least consideration, the fewest resources, and generally short shrift throughout the development organization.

Every study ever done on the effectiveness of software testing has shown that the more time you spend up front on testing, the less time and money it takes to complete your project to the level of quality you want to achieve. Everyone in the industry knows this to be true. Yet most developers don't think about how they will test their software until after it is already written. Despite the fact that, time and again, all the evidence points to the fact that a bug found at the beginning of development is orders of magnitude less expensive and time-consuming to fix than one found at the end of the development cycle, and bugs are even more expensive and time-consuming to fix after the product has reached the customer.

Why should this be the case?

There are many reasons why developers don't like testing. Testing is perceived as less "fun" than writing "real" code. Most software-development organizations reward developers for producing features in the shortest amount of time, not for writing the highest-quality code. The majority (or at least a plurality) of software companies do not have a mature testing organization, which makes testing appear amateurish and as though it is not ...

Get Code Leader: Using People, Tools, and Processes to Build Successful Software 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.