written 8.7 years ago by | • modified 8.7 years ago |
This question appears in Mumbai University > Software Testing & Quality Assurance Subject
Marks: 5M,6M,10M
Year: Dec 2013, May 14,Dec 2014,Dec 2015
written 8.7 years ago by | • modified 8.7 years ago |
This question appears in Mumbai University > Software Testing & Quality Assurance Subject
Marks: 5M,6M,10M
Year: Dec 2013, May 14,Dec 2014,Dec 2015
written 8.7 years ago by |
Boundary Value Analysis:
The central idea of Boundary Value Analysis (BVA) is to select test data near the boundary of a data domain so that data both within and outside an Equivalence Class (EC) are selected.
It produces test inputs near the boundaries to find failures caused by incorrect implementation of the boundaries.
BVA is a black box testing technique. It makes use of the fact that the inputs and outputs of the component under test can be partitioned into ordered sets within identifiable boundaries.
Boundary value analysis is most common when checking a range of numbers.
Boundary conditions are predicates that apply directly on and around the boundaries of input EC’s and output EC’s
BVA technique is an extension and refinement of EC partitioning technique.
Guidelines for Boundary Value Analysis :
The guidelines below are applicable to both input conditions and output conditions which are useful in identifying high quality test cases:
1.The EC specifies a range :
If an EC specifies a range of values, then construct test cases by considering the boundary points of the range and points just beyond the boundaries of the range.
For example, let an EC specify the range of – 10.0<= X <= 10.0. This would result in test data { -9.9,-10.0,-10.1 } and {9.9, 10.0,10.1}.
2.The EC specifies a number of values:
3.The EC specifies an ordered set :
Example of Boundary Value Analysis :
Adjusted Gross Income :
Consider a software system that computes income tax based on Adjusted Gross Income (AGI) according to the following rules :
Test case No. | Test Value | Expected Result | Equivalence Class,being tested |
---|---|---|---|
TC1 | \$22,000 | \$ 4,840 | EC1 |
TC2 | \$46,000 | \$ 12,420 | EC2 |
TC3 | \$68,000 | \$ 24,480 | EC3 |
TC4 | \$ -20,000 | Rejected with an,error message | EC4 |
TC5 | \$150 billion | Rejected with an,error message | EC5 |
EC1 : \$1<=AGI<=$29,500 ; This would result in values of \$1, \$0, \$-1, \$1.50 and $29,499.50, \$29,500, \$ 29,500.50 .
EC2 : AGI<1 ; This would result in values of \$1, \$0, \$-1, \$-100 billion.
EC3 : \$29,501 <=AGI<= $58,500 ; This would result in values of \$29,500, \$29,500.50, \$ 29,501 and \$58,499 , \$58,500 , \$58,500.50, \$58,501.
EC4 : \$58,501 <=AGI<= \$100 billion ; This would result in values of \$58,500 , \$58,500.50, \$58,501 and \$100 billion,101 billion.
EC5 : AGI > $100 billion; This would result in \$100 billion, \$101 billion, \$10000 billion.