In case of three inputs Boundary value Test cases are

1
There are two types of testing
1. Black box testing ( by giving inputs test the output according to the requirements)
2. White box testing ( testing source code )
Black box testing means by giving input, check whether the output is according to the given
requirement or not.
Example: Requirement for age drop down (1-100)
(If you select the values between 1 -100, it should accept Else it should display error message)
But it is not possible to test all the values from 1 to 100(time consuming)
To overcome that, two types of black box testing methods are there to derive test cases
1. Boundary value analysis
2. Equivalence class testing
BOUNDARY VALUE ANALYSIS
Boundary value analysis is one of the black box testing methods to derive test cases and to make
sure it will work for all the values with in the boundary. It is a subset of Robustness Testing.
Example:
Requirement: Age: 1-100
Boundary Value Test Cases are (min, min+1, avg, max-1, max)
1
2
51
99 100
Min+
Avg
Max|------|----------------------|------------------------|------|
Min
Max
Boundary value test cases of single input
Here we are testing within the boundaries (only valid data according to the requirement)
We are not testing for invalid (out of boundary).

Min ------------------------------------ - Minimal
Min+ ------------------------------------ - Just above Minimal
Nom ------------------------------------ - Average
Max- ------------------------------------ - Just below Maximum
Max ------------------------------------ - Maximum
18 September 2012
2
Boundary value analysis test cases for two inputsx1, x2 are
{< x1 nom,x2min>,< x1 nom,x2min+>,< x1 nom,x2nom>,< x1 nom,x2max->,< x1 nom,x2max>,
<x1min+,x2nom>,<x1min,x2nom>, <x1max,x2nom>,<x1max-,x2nom> }
No. of test cases are 4n+1 (n is no of inputs)
Give each set of inputs and check whether the output is according to the requirement or not, instead
of testing all the values, you have to test the above set of inputs to make sure it will work for all the
values within the range.
Example of two inputs
To test whether multiplication is working correctly or not (we need 2 inputs)
Requirement:- c= a* b
(1<=a<=100, 1<=b<=100)
Boundary value sets are a= {1,2,50,99 ,100} b={1,2,50,99,100}
Based on the above sets, combinations of test cases (input sets by BVA) are
{(50,1),(50,2),(50 ,50),(50,99),(50,100),(1,50),(2,50)(99,50)(100,50)}
Take first set of inputs and check whether it is according to the requirement or not
First set input values are 50 and 1
c=50*1
It displays some result that is called actual result, if you know the multiplication  you can
expect the result that is called expected result (if both accepted result and actual result are same you
can say first test case is pass else fail)
18 September 2012
3
Like this you have to test all sets of inputs one by one, Second set is (50, 2) give inputs and
compare actual and expected and decide whether that is pass or fail. Same way third set (50, 50),
fourth (50,99)...
Table format of multiplication test cases (BVA)
Inputs
A
50
50
50
………….
Expected
Result
50
100
2500
…………..
B
1
2
50
…………….
Actual
Result
50
100
2500
……….
Status
Pass/fail
Pass
Pass
Pass
………….
In case of three inputs Boundary value Test cases are (example triangle problem)
X1, x2, x3 are 3 sides of triangle
{< x1 nom,x2min>,< x1 nom,x2min+>,< x1 nom,x2nom>,< x1 nom,x2max->,< x1 nom,x2max>,
<x1min+,x2nom>,<x1min,x2nom>, <x1max,x2nom>,<x1max-,x2nom> }
*
{x3 min, x3 min+1, x3 nom, x3max-1, x3max} (Cartesian product)
Requirement:1 ≤ x1 ≤ 100,
1 ≤ x2≤ 100,
1 ≤ x3≤ 100 are three sides of triangle.
Test Cases of a triangle are
{(50,1),(50,2),(50 ,50),(50,99),(50,100),(1,50),(2,50)(99,50)(100,50)} * {1, 2, 50, 99,100}
{(50,1,1)(50,2,1)(50,50,1),(50,99,1)(50,100,1)……………………………………..}
Give each set of inputs and compare actual and expected results
Table format of triangle test cases using BVA
Inputs
x1
50
x2
1
x3
1
Expected
Result
Isosceles
Actual
Result
Not a triangle
Status
Pass/fail
Fail
50
50
………….
2
50
…………….
1
1
………..
Scalene
Isosceles
…………..
Scalene
Not a triangle
……….
Pass
Fail
………….
18 September 2012
4
Worst-case Boundary value analysis Test cases of two inputs:-
These test cases although more comprehensive in their coverage, constitute much more endeavour. To
compare we can see that Boundary Value Analysis results in 4n + 1 test case where Worst-Case testing
n
results in 5 test cases. As each variable has to assume each of its variables for each permutation (the
Cartesian product) we have 5 to the n test cases.
18 September 2012
5
Worst-Case Boundary value Test cases of three inputs triangle problem:Three sides of the triangle are x1, x2, x3 lies between1-200 test cases are
} * {x3 min, x3 min+1, x3 nom, x3max-1, x3 max}
Total no.of test cases are 5 n
(N is no.of inputs)
ROBUSTNESS TESTING
Robustness testing is an extension of boundary value analysis, another black box testing method to
derive test cases and to make sure it will work for all the values (valid and invalid)with in and out of
the boundaries.
Requirement of ATM withdraw min amount is 100 max is 10,000
Robustness Test Cases are (Min-1, min, min+1, avg, max-1, max max+1)
0
1
2
51
99 100 101
MinMin+
Avg
MaxMax+
|------|------|----------------------|------------------------|------|------|
Min
Max
Robustness Test Cases of single input
Robustness Test Cases of two inputs x1, x2
18 September 2012
6
{< x1 nom,x2min->,< x1 nom,x2min>,< x1 nom,x2min+>,< x1 nom,x2nom>,< x1 nom,x2max->,
<x1nom,x2max>,<x1nom,x2max+>,<x1min,x2nom>,<x1min,x2nom>,<x1min+,x2nom><x1max+,x2nom>,
<x1max,x2nom>,<x1max-,x2nom> }
No.of test cases are 6n+1 (n is no of inputs)
Give each set of inputs and check whether the output is according to the requirement or not, instead
of testing all the values you have to test the above set of inputs to make sure it will work for all the
values with in and out of the boundaries(valid and invalid).
Example for writing Robustness Test Case of two inputs
To test whether addition is working correctly or not (2 inputs)
c= a+ b (1<=a<=100, 1<=b<=100)
a= {0,1,2,50,99,100,101} b={0,1,2,50,99,100,101}
Based on the above sets, combinations of test cases(inputs) are
{(50,0)(50,1),(50,2),(50 ,50),(50,99),(50,101),(50,100),(1,50),(2,50)(99,50)(100,50)(101,50)(0,50)}
Take first set of inputs and check whether it is according to the requirement or not
First set input values are 50 and 0
c=50+0
It displays some result that is called actual result, if you know the addition  you can expect the
result that is called expected result (if both accepted result and actual result are same you can say
first test case is pass else fail)
18 September 2012
7
Like this you have to test all sets of inputs one by one , second set is (50, 1) give inputs and
compare actual and expected and decide whether that is pass or fail. Same way third set (50, 2),
fourth (50, 50) ...
Table format of addition test cases (Robustness Testing)
Inputs
Expected
Result
A
B
50
0
50
50
1
51
50
2
52
50
50
100
………….
…………….
…………..
Actual
result
50
51
52
100
……….
Status
Pass/fail
Pass
Pass
Pass
Pass
………….
Robustness Test Cases In case of three inputs (example triangle problem):{< x1 nom,x2min->,< x1 nom,x2min>,< x1 nom,x2min+>,< x1 nom,x2nom>,< x1 nom,x2max->,
<x1nom,x2max>,<x1nom,x2max+>,<x1min,x2nom>,<x1min,x2nom>,<x1min+,x2nom><x1max+,x2nom>,
<x1max,x2nom>,<x1max-,x2nom> } *
{x3 min-,x3 min, x3 min+1, x3 nom, x3 max-1, x3
max,x3 max+}
Requirement:1 ≤ x1 ≤ 100,
1 ≤ x2≤ 100,
1 ≤ x3≤ 100 are three sides of triangle.
Test cases are
{(50,0),(50,1),(50,2),(50
,50),(50,99),(50,100),(50,101)(0,50),(1,50),(2,50)(99,50)(100,50),(101,50)} *
{0, 1, 2, 50, 99,100,101}
{(50,0,0)(50,1,0)(50,2,0)(50,50,0),(50,99,0)(50,100,0)……………………………………..}
Give each set of inputs and compare actual and expected result
Table format of triangle test case (robustness testing)
Inputs
Expected
Result
X1
X2
X3
Isosceles
50
0
0
50
50
1
2
18 September 2012
0
0
Scalene
Scalene
Actual
result
Status
Pass/fail
Not a triangle
Fail
Scalene
Scalene
Pass
Pass
8
………….
…………….
Worst–Case
………..
Robustness
…………..
Test
Cases
……….
of
………….
two
inputs
These test cases although more comprehensive in their coverage, constitute much more endeavour. To
compare we can see that Robustness Testing results in 6n + 1 test case where Worst-Case testing results
n
in 7 test cases. As each variable has to assume each of its variables for each permutation (the Cartesian
product) we have 7 to the n test cases.
Total no.of Test Cases are 7n
18 September 2012
9
Worst-case Robustness Test cases of triangle problem(x1, x2, x3 are the sides):{
}
* {x3 min-,x3 min, x3 min+1, x3 nom, x3 max-1, x3 max,x3 max+}
18 September 2012
10
Below are the few worst-case BVA Test Cases of triangle problem
Conclusion: The above Test cases are used in the case of single or multiple inputs and inputs should have
upper and lower boundaries)
 Not possible to test all the values so we can use this Black Box Testing methods
 BVA is sub set of Robustness testing, using BVA we are testing within the boundaries (valid
inputs), in Robustness Testing we are testing with and with out of the boundaries (valid and
invalid).
 Best method to follow is Robustness testing
18 September 2012