Identifying Equivalence Classes
Test cases by equivalence partitioning technique are designed in two stages:
1) identification of equivalence classes;
2) construction of test cases.
Equivalence classes are identified by picking each input condition (as a rule the sentence or phrase is contained in the specification) and splitting it into two or more groups. You may use the table below for this purpose.
There are equivalence classes of two types: valid equivalence classes which are the valid input data to the program and invalid equivalence classes which are all other states of the condition (id est., wrong input values). Thus, they adhere to the principle stating that you must focus on invalid or unexpected conditions.
Given that input or external conditions are specified, the act of identifying equivalence classes is mostly a heuristic process. Be aware of the following rules:
- If an input condition defines a range of values (for instance, “the integer can be from 1 to 999”), one valid equivalence class (1 < integer< 999) and two invalid ones (integer < 1 and integer > 999) are identified.
- If an input condition defines the number of values (e.g., “one through six people can travel in the autocar”), one valid equivalence class and two invalid ones (nobody and more than six people) are identified.
- If an input condition defines a set of input values and it makes sense to suppose that each value is handled by the program in a different way (for instance, “methods of movement are known on the BUS, TRUCK, TAXI, MOTORCYCLE or Passenger”), a valid equivalence class for every value and one invalid equivalence class (for instance, ” TRAILER”) are identified.
- If an input condition defines the “should be” situation (e.g., “the first symbol of the identifier should be a letter “), one valid equivalence class (the first character is a letter) and one is invalid (the first character isn’t a letter) are identified.
- If there are no grounds for believing that different items of the equivalence class are handled differently by the program, then this equivalence class is split into smaller equivalence classes.
Is your software app really ready for commercial release? Has it been thoroughly tested? If you are not sure that your products will satisfy the needs of the end users it is time to use the services of software qa company. The staff is highly resourceful in finding and executing solutions. The company has deep testing expertise of all kinds of apps, including desktop, mobile and web applications, using the latest technologies and tools.