Equivalence partitioning
It can be applied at any level of testing and is often a good technique to use first.
The idea behind the technique is to divide (i.e. to partition) a set of test conditions into groups or sets that can be considered the same (i.e. the system should handle them equivalently), hence 'equivalence partitioning'.
This is because we are assuming that all the conditions in one partition will be treated in the same way by the software. If one condition in a partition works, we assume all of the conditions in that partition will work, and so there is little point in testing any of these others. Conversely, if one of the conditions in a partition does not work, then we assume that none of the conditions in that partition will work so again there is little point in testing any more in that partition.
For example, a savings account in a bank earns a different rate of interest depending on the balance in the account. In order to test the software that calculates the interest due, we can identify the ranges of balance values that earn the different rates of interest. For example, if a balance in the range $0 up to $100 has a 3% interest rate, a balance over $100 and up to $1000 has a 5% interest rate, and balances of $1000 and over have a 7% interest rate, we would initially identify three valid equivalence partitions and one invalid partition as shown below.
Invalid partition Valid (for 3% interest) Valid (for 5%) Valid (for 7%)
-$0.01 $0.00 $100.00 $100.01 $999.99 $1000.00
Boundary value analysis
If you have ever done 'range checking', you were probably using the boundary value analysis technique, even if you weren't aware of it. To apply boundary value analysis, we will take the minimum and maximum (boundary) values from the valid partition
As an example, consider a printer that has an input option of the number of copies to be made, from 1 to 99.
(BVA) is based on testing at the boundaries between partitions.
The equivalence-partitioning technique then requires that we need test only one condition from each partition. (EP) is a good all-round specification-based black-box technique
No comments:
Post a Comment