O'Reilly logo

Quality Code: Software Testing Principles, Practices, and Patterns by Stephen Vance

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Logging and Other Facilities of Last Resort

There are times when all reasonable seams fail your purpose. You beat your head against a wall. “How can I test this piece of code?” you scream in frustration. You want to test the code. You need to test the code. Your obsession with mastery over the system will not let you quit. Such moments lead to desperate decisions.

First, take a break. Get some fresh air. Go for a walk. Take a nap. Have a smoke, if that is your vice. Check your e-mail. Read a chapter of a good novel. Do whatever you have to do to break the fixation, distract your brain, and get some space. If after all of that you still need to beat the challenge, read on and consider the end of the test-seam rope, but see Figure 12-1.

Figure ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required