if exhaustive testing is not possible, then
how many test cases? 12
what are the values? -129, -128, -127, 0, 9,10,11,65,126,127,128
test case design techniques:
with less test cases, find max possible errors.
equivalence class partitioning ==> boundary (relational operator)
boundary value analysis ==> boundary (relational operator)
MC/DC ==> logical equation && ||
Requirement based testing RBT:
REQ1: If a is greater than 10, then set b to True; otherwise set b to False.
Note: a is integer type. Range (-128 to 127)
b is Boolean type. Range: True, False
understand requirement. identify inputs and outputs variables. types and ranges
input: a (int ==> -128 to 127)
output: b (bool ==> True, False)
ECP: atleast one test case for each equivalence class (each behavior)
equivalence class - behavior same
[-128 to 10] ==> False ==> -129, -128, -127, 0, 9, 10, 11
[11 to 127] ==> True ==> 10,11,12, 65, 126,127,128
missed identifying errors at boundaries. we have use BVA along with ECP to catch errors at boundaries.
a exp b act b
10 False True FAIL
25 True True PASS
BVA ==> 7 test cases for each equivalence
[min, max]
min-1, min, min+1, mid, max-1, max, max+1
[10 to 20]
9 10 11 15 19 20 21
Test Cases:
---------------------------------
a b(exp) b(act)
---------------------------------
-129 Robustness test cases ==> missing requirement
-128 False False pass Normal Range test case
-127 False False pass
0 False False pass
9 False False pass
10 False True fail
11 True True pass
65 True True pass
126 True True pass
127 True True pass
128 Robustness test case ==> missing requirement
----------------------------------
if(a>=10)
b = True;
else
b = False;