Chapter 10. Equivalence Classes and Boundary Values
In this chapter, I begin examining test design techniques, which will take up the rest of this book. I start with test design techniques that focus primarily on intended behaviors. These are sometimes called black-box test techniques because the focus is on the externally visible aspects of the system (the “box”) rather than how the system works. I start this sequence of chapters with two prevalent techniques, equivalence class partitioning and its extension, boundary value analysis.
Before we get into the trees, let’s explain the forest. When writing a program, a big part of the job is recognizing that the program will need to deal with various situations, some of which will require unique elements of the program to handle them correctly. There is always a risk that the programmer might fail to recognize a particular situation as unique and needing unique handling. Another risk is that the programmer recognizes that the situation is unique but might create unique elements of the program that handle the situation incorrectly. Equivalence partitioning helps you recognize and test these unique situations to make sure the programmer didn’t make such mistakes.
Often, when considering these unique situations, you see that they have boundaries; that is, the smallest value that qualifies for handling under the rules of this situation and the largest value that qualifies for handling under the rules of this situation. The programmer must ...
Get Pragmatic Software Testing: Becoming an Effective and Efficient Test Professional 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.