Question: A program reads an integer number within the range [0, 200] and determines whether it is an even number or not. Design test cases for this program using BVC, robust and worst case testing methods.
0

Mumbai University > Information Technology > Sem 8 > Software Testing and Quality Assurance

Marks: 10 Marks

Difficulty : Medium

mumbai university • 242 views
 modified 3 months ago by RB ♦♦ 100 written 3 months ago by Ankit Pandey ★ 70
0

Test cases using BVC

Since there is only one variable for finding number is even or not, the total test cases will be 4n + 1 = 5

$\therefore$ min value = 0

maximum value = 200

minimum + value = 1

maximum - value = 199

nominal value = 100

Using this test cases designs are as follows.

Test case id Integer value Expected o/p
1 0 even no.
2 200 even no.
3 1 odd no.
4 199 odd no.
5 100 even no.

* Test cases using robust testing :

$\therefore$ there is only one variable, total no. of test cases will be

6n + 1 = 7

min value = 0

max value = 100

min - value = -1

min + value = 1

max + value = 201

max - value = 199

nominal value = 100

Using these values, test cases can be designed as follows:

Test case ID Integer value Expected o/p
1 0 even no.
2 200 even no.
3 -1 odd no.
4 1 odd no.
5 201 odd no.
6 199 odd no.
7 100 even no.

Test cases using worst case testing : since there is only one variable, the total number of test cases will be $5^n = 5$ Therefore the number of test cases will be same as BVC.