Chapter 8. TESTING TIMES
The Black Art of Testing Code
Test everything. Keep what is good.
Write as much code as you like—there’s one thing you can be sure of: It won’t work perfectly the first time. It doesn’t matter how long you took to carefully design it; software faults have a creepy ability to work their way into any program. The more code you write, the more faults you’ll introduce. The faster you write, the more you’ll introduce. I’ve yet to meet a really prolific programmer who created anything near bug-free code.
What do we do about this? We test our code. We do this to find any problems that exist, and once we’ve fixed them, we use the tests to maintain confidence in the quality of the code as we continue to modify ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access