Boundary Value Analysis
Boundary Value Analysis
A simple example
Consider a program that reads the age of
each person here and computes the average
age of the people.
1 <=
1
age
<= 150
age
150
at the minimum
at one above minimum
at middle
at one below maximum
at maximum
1.
2.
3.
4.
5.
1.
2.
3.
4.
5.
n= 1 ;
n =2;
n = 12;
n = 22;
n = 23;
age = whatever(37)
age = whatever
age = whatever
age = whatever
age = whatever
n= 12;
n =12;
n = 12;
n = 12;
n = 12;
age = 1
age = 2
age = 37
age = 149
age = 150
2 independent inputs
age
yrs of ed.
- Note that there needs to be only 9 test cases for 2 independent
variables or inputs.
- In general, there will be (4z + 1) test cases for z independent inputs.
Robustness testing
Problem
Severity?
Y
- Note that there needs to be only 13 test cases for 2 independent
variables or inputs.
- In general, there will be (6n+ 1) test cases for n independent inputs.
For 2 non-independent
variables, there are
52 = 25 test cases
Y
- In general, there will be 5n test cases for n non-independent inputs.
Hierarchy
For n = number of variables (input fields)
4n + 1
6n + 1
5n
7n
Based on experience
Based on special knowledge of the industry
Ad hoc in nature
Has had some very valuable inputs
Costly to find the industry experts
Especially for
multiple
dependent and
legitimate test
cases