face="Verdana, Arial, Helvetica, sans-serif">Let us take an example program where we consider "Pay" as an input having values 12000 to 35000 in the valid range. The program calculates the corresponding tax with following assumptions:
1) Pay up to Rs. 15000 – Tax is Zero
2) Pay between 15001 and 25000 – Tax is 18 % of Pay
3) Pay above 25000 – Tax is 20% of Pay
Here the valid input domain can be divided into three valid equivalent classes like:
Class c1 : Values in the range 12000 to 15000
Class c2: Values in the range 15001 to 25000
Class c3: Values more than 25000
Test cases utilizing valid equivalence classes having values in falling within the range of 12000 to 15000 of Pay shall be
While observing the "Observed Output" column, Desired Outputs are always found to be different for any set of two successive inputs. Hence it is necessary to carryout the testing with the help of boundary value analysis approach by maintaining such difference. Similar approach is applied to verify the output boundaries as well.
Few other illustrations of test cases designed with boundary value analysis approach are:
a) Testing of a compiler using an empty source code
b) Testing of trigonometric functions as TAN having values close to p/2
c) Testing of a function involving deletion of a record from a particular empty data file or a data file having just a single record.
Thus summarizing, Boundary Value Analysis is an efficient approach of designing the test cases, which can discover majority of most common errors getting introduced during