13Testing
No amount of testing can prove a software right, a single test can prove a software wrong.
—Amir Ghahrai
Testing is the process of comparing the invisible to the ambiguous, so as to avoid the unthinkable happening to the anonymous.
—James Bach
What You Will Learn in This Chapter:
- Goals of testing
- Reasons why you might not want to remove a bug
- How to prioritize bugs
- Kinds of tests and testing techniques
- Good testing habits
- Methods for estimating number of bugs
It's a software engineering axiom that all nontrivial programs contain bugs. Actually, it's such an important point that it deserves to be repeated.
For example, Windows 2000 was said by some to contain a whopping 63,000+ known bugs when it was shipped. Microsoft quickly retorted that this number didn't actually count bugs. It included feature requests, notes asking developers to make something work better or more efficiently than it already did, clarification requests, and other non-bug issues. The true bugs, Microsoft explained, were mostly minor issues that wouldn't seriously hurt users.
No matter how you count them, Windows 2000 contained a lot of “undesirable features” ranging from changes that should probably have been made to indisputable bugs.
You might think that's the result of shoddy workmanship, but no project of that size could possibly have shipped without any bugs. The industry average number of bugs per thousand lines of code (kilo lines of ...
Get Beginning Software Engineering, 2nd Edition 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.