The Art of Software Testing, Second Edition
by Glenford J. Myers, Corey Sandler, Tom Badgett, Todd M. Thomas
4.2. Error Guessing
It has often been noted that some people seem to be naturally adept at program testing. Without using any particular methodology such as boundary-value analysis of cause-effect graphing, these people seem to have a knack for sniffing out errors.
One explanation of this is that these people are practicing, subconsciously more often than not, a test-case-design technique that could be termed error guessing. Given a particular program, they surmise, both by intuition and experience, certain probable types of errors and then write test cases to expose those errors.
It is difficult to give a procedure for the error-guessing technique since it is largely an intuitive and ad hoc process. The basic idea is to enumerate a list of possible errors or error-prone situations and then write test cases based on the list. For instance, the presence of the value 0 in a program's input is an error-prone situation. Therefore, you might write test cases for which particular input values have a 0 value and for which particular output values are forced to 0. Also, where a variable number of inputs or outputs can be present (e.g., the number of entries in a list to be searched), the cases of "none" and "one" (e.g., empty list, list containing just one entry) are error-prone situations. Another idea is to identify test cases associated with assumptions that the programmer might have made when reading the specification (i.e., things that were omitted from the specification, either ...
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