The Art of Software Testing, Second Edition
by Glenford J. Myers, Corey Sandler, Tom Badgett, Todd M. Thomas
6.1. Function Testing
As indicated in Figure 6.3, function testing is a process of attempting to find discrepancies between the program and the external specification. An external specification is a precise description of the program's behavior from the point of view of the end user.
Except when used on small programs, function testing is normally a black-box activity. That is, you rely on the earlier module-testing process to achieve the desired white-box logic-coverage criteria.
To perform a function test, the specification is analyzed to derive a set of test cases. The equivalence-partitioning, boundary-value analysis, cause-effect graphing, and error-guessing methods described in Chapter 4 are especially pertinent to function testing. In fact, the examples in Chapter 4 are examples of function tests. The descriptions of the FORTRAN DIMENSION statement, the examination-scoring program, and the DISPLAY command actually are examples of external specifications. (Note, however, that they are not completely realistic examples; for instance, a real external specification for the scoring program would include a precise description of the format of the reports.) Hence, no examples of function tests are presented in this section.
Many of the guidelines of Chapter 2 also are particularly pertinent to function testing. Keep track of which functions have exhibited the greatest number of errors; this information is valuable because it tells us that these functions probably also contain ...
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