Using the equivalence partitioning method, test cases are determined in two stages:
1) identification of equivalence classes;
2) development of tests.
This article will acquaint you, Dear Reader, with the process of identifying equivalence classes.
Equivalence classes are identified by selecting each input condition (usually the phrase or sentence in the specification) and by dividing it into two or more groups. To perform this operation, use the table shown in Fig. 1.
Fig. 1. Example of the table for listing equivalence classes
Note that there are two types of equivalence classes:
- valid equivalence classes representing valid input data of the program;
- invalid equivalence classes representing all other possible condition states (i.e. invalid input values).
Thus, there is a tendency to stick to one of the basic principles of testing about the need to focus on invalid or unexpected conditions.
Installation testing services are in high demand because many people cannot correctly set up new software programs and usually miss some important components.
If input or external conditions are applied, then the identification of equivalence classes is nothing else but a heuristic process. There are a number of rules:
- If the input condition describes a range of values (for instance, “an integer can take values from 1 to 99”), then you can identify one valid equivalence class (1 ≤ integer value ≤ 99) and two invalid ones (integer value <1 and integer value > 99).
- If the input condition describes the number of values (for example, “one to six people can travel in a car”), one valid equivalence class and two invalid ones (none and more than six people) are defined.
If the input condition describes a set of input values and there is reason to believe that each value is handled specifically by the program (for example, such job positions as “the engineer, technician, machine shop manager, the director” are known), then for each value, valid and invalid equivalence classes are defined (For instance, “ACCOUNTANT”).
If the input condition describes the situation “should be” (for example, “the first symbol of the identifier is necessarily a letter”), in this case one valid equivalence class (the first symbol is a letter) and one invalid class are defined (the first symbol is not a letter).
If it is reasonable to believe that different elements of the equivalence class are handled by the program in different ways, then this equivalence class is divided into smaller equivalence classes.
Comments are closed.