Page 219 - DCAP405_SOFTWARE_ENGINEERING
P. 219
Software Engineering
Notes For reasons that are not completely clear, a greater number of errors tends to occur at the
boundaries of the input domain rather than in the “center”. It is for this reason that boundary
value analysis (BVA) has been developed as a testing technique. Boundary value analysis leads
to a selection of test cases that exercise bounding values.
Boundary value analysis is a test case design technique that complements equivalence
partitioning. Rather than selecting any element of an equivalence class, BVA leads to the selection
of test cases at the “edges” of the class. Rather than focusing solely on input conditions, BVA
derives test cases from the output domain as well.
Guidelines for BVA are similar in many respects to those provided for equivalence partitioning:
1. If an input condition specifies a range bounded by values a and b, test cases should be
designed with values a and b and values just above and just below a and b.
2. If an input condition specifies a number of values, test cases should be developed that
exercise the minimum and maximum numbers. Values just above and below minimum
and maximum are also tested.
3. Apply guidelines 1 and 2 to output conditions. For example, assume that a temperature vs.
pressure table is required as output from an engineering analysis program. Test cases
should be designed to create an output report that produces the maximum (and minimum)
allowable number of table entries.
4. If internal program data structures have prescribed boundaries (e.g., an array has a defined
limit of 100 entries), be certain to design a test case to exercise the data structure at its
boundary.
Most software engineers intuitively perform BVA to some degree. By applying these guidelines,
boundary testing will be more complete, thereby having a higher likelihood for error detection.
It’s widely recognized that input values at the extreme ends of input domain cause more errors
in system. More application errors occur at the boundaries of input domain. ‘Boundary value
analysis’ testing technique is used to identify errors at boundaries rather than finding those exist
in center of input domain.
Notes Boundary value analysis is a next part of Equivalence partitioning for designing
test cases where test cases are selected at the edges of the equivalence classes.
Test cases for input box accepting numbers between 1 and 1000 using Boundary value analysis:
1. Test cases with test data exactly as the input boundaries of input domain i.e. values 1 and
1000 in our case.
2. Test data with values just below the extreme edges of input domains i.e. values 0 and 999.
3. Test data with values just above the extreme edges of input domain i.e. values 2 and 1001.
Boundary value analysis is often called as a part of stress and negative testing.
Notes There is no hard-and-fast rule to test only one value from each equivalence class
you created for input domains. You can select multiple valid and invalid values from each
equivalence class according to your needs and previous judgments.
212 LOVELY PROFESSIONAL UNIVERSITY