The Art of Software Testing, Second Edition
by Glenford J. Myers, Corey Sandler, Tom Badgett, Todd M. Thomas
2.2. The Economics of Testing
Given this definition of program testing, an appropriate next step is the determination of whether it is possible to test a program to find all of its errors. We will show you that the answer is negative, even for trivial programs. In general, it is impractical, often impossible, to find all the errors in a program. This fundamental problem will, in turn, have implications for the economics of testing, assumptions that the tester will have to make about the program, and the manner in which test cases are designed.
To combat the challenges associated with testing economics, you should establish some strategies before beginning. Two of the most prevalent strategies include black-box testing and white-box testing, which we will explore in the next two sections.
2.2.1. Black-Box Testing
One important testing strategy is black-box, data-driven, or input/output-driven testing. To use this method, view the program as a black box. Your goal is to be completely unconcerned about the internal behavior and structure of the program. Instead, concentrate on finding circumstances in which the program does not behave according to its specifications.
In this approach, test data are derived solely from the specifications (i.e., without taking advantage of knowledge of the internal structure of the program).
If you want to use this approach to find all errors in the program, the criterion is exhaustive input testing, making use of every possible input condition as ...
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