0% found this document useful (0 votes)
1K views4 pages

BVA

The document describes test case design for programs that perform prime number checking and exponentiation calculations using different testing techniques. Boundary Value Analysis (BVA), robust testing, and worst case testing are applied to define test cases covering minimum, maximum, nominal and invalid input values for the programs. Formulas to calculate the number of test cases for each technique are provided based on the number of input variables. Several tables of example test cases generated from these techniques are included.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views4 pages

BVA

The document describes test case design for programs that perform prime number checking and exponentiation calculations using different testing techniques. Boundary Value Analysis (BVA), robust testing, and worst case testing are applied to define test cases covering minimum, maximum, nominal and invalid input values for the programs. Formulas to calculate the number of test cases for each technique are provided based on the number of input variables. Several tables of example test cases generated from these techniques are included.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

BVA

Q.1 A program reads an integer number within the range [1,100] and determines whether it is
a prime number or not. Design test cases for the program using BVC, robust and worst case testing
methods

n is number of variables, then number of test cases using


BVC 4n+1
Robust 6n+1
Worst case testing 5n
Robust worst case testing 7n

BVC [1,100]

Min value = 1
Min+1 value = 2
Max value = 100
Max-1 value =99
Nominal value = 51

Test Cases using BVC 4n+1 = 4(1)+1= 5

Test case id Integer variable Expected output


1 1 Not a prime number
2 2 Prime number
3 100 Not a prime number
4 99 Not a prime number
5 51 Not a Prime number

Robust testing [1,100]

Min value = 1
Min-1 value = 0
Min+1 value = 2
Max value = 100
Max-1 value = 99
Max+1 value = 101
Nominal value = 53

Test Cases using Robust testing 6n+1 = 6(1)+1= 7

Test case id Integer variable Expected output


1 1 Not a prime number
2 0 Invalid input
3 2 Prime number
4 100 Not a prime number
5 99 Not a prime number
6 101 Invalid input
7 53 Prime number
BVA

Worst testing 5n

Min value = 1
Min+1 value = 2
Max value = 100
Max-1 value = 99
Nominal value = 53

Test Cases using worst case testing 5n = 51 =5

Test case id Integer variable Expected output


1 1 Not a prime number
2 2 Prime number
3 100 Not a prime number
4 99 Not a prime number
5 53 Prime number

Robust Worst case testing 7n

Min value = 1
Min-1 value = 0
Min+1 value = 2
Max value = 100
Max-1 value = 99
Max+1 value = 101
Nominal value = 53

Test Cases using Robust worst case testing 7n = 71 = 7

Test case id Integer variable Expected output


1 1 Not a prime number
2 0 Invalid input
3 2 Prime number
4 100 Not a prime number
5 99 Not a prime number
6 101 Invalid input
7 53 Prime number
BVA

Q.2 A program computes ab where a is an integer number within the range [1,10] and b within
[1,5]. Design test cases for the program using BVC, robust and worst case testing methods

Two variable a[1,10] , b[1,5]

BVC

a b
Min value 1 1
Min+1 value 2 2
Max value 10 5
Max-1 value 9 4
Nominal value 5 3

Test Cases using BVC 4n+1 = 4(2)+1= 9

Test case id a b Expected output


1 1 3 1
2 2 3 8
3 10 3 1000
4 9 3 729
5 5 1 5
6 5 2 25
7 5 5 3125
8 5 4 625
9 5 3 125

Robust testing 6n+1= 13 a[1,10] b[1,5]

a b
Min value 1 1
Min+1 value 2 2
Min-1 value 0 0
Max value 10 5
Max-1 value 9 4
Max+1 value 11 6
Nominal value 5 3

Test Cases using Robust 6n+1 = 6(2)+1= 13

Test case id a b Expected output


1 1 3 1
2 2 3 8
3 0 3 Input a is invalid
4 10 3 1000
5 9 3 729
6 11 3 Input a is invalid
7 5 1 5
BVA

8 5 2 25
9 5 0 Input b is invalid
10 5 5 3125
11 5 4 625
12 5 6 Input b is invalid
13 5 3 125

Worst case testing

a b
Min value 1 1
Min+1 value 2 2
Max value 10 5
Max-1 value 9 4
Nominal value 5 3

Test Cases using worst case testing 5n = 52 = 25

Test case id a b Expected output


1 1 1 1
2 2 1 2
3 10 1 10
4 9 1 9
5 5 1 5
6 1 2 1
7 2 2 4
8 10 2 100
9 9 2 81
10 5 2 25
11 1 5 1
12 2 5 32
13 10 5 100000
14 9 5 59049
15 5 5 3125
16 1 4 1
17 2 4 16
18 10 4 10000
19 9 4 6561
20 5 4 625
21 1 3 1
22 2 3 8
23 10 3 1000
24 9 3 729
25 5 3 125

Robust worst case testing 7n = 72 = 49 test cases

You might also like