Chapter 11. Error Condition Verification

You can tell a well-written piece of software as much by the way it handles failures as by the way it implements its primary functionality. Software failures stimulate an inordinate proportion of the support requests against and, perhaps more importantly for your product’s reputation, the blog posts, forum comments, and tweets about your product. Yet error paths are often the least tested part of the code.

This chapter focuses on testing your failure paths. It relies heavily on the material from the previous chapters. In fact, it adds little in the way of new techniques for verification and injection of behavior. Rather, it shows you how to apply the previous techniques to the problem of inducing and verifying ...

Get Quality Code: Software Testing Principles, Practices, and Patterns 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.