Functional Testing
Functional Testing
Meenakshi D’Souza
x P
x
x ≥ 20 f
Testing a function in context, contd.
If the input domain is too large for all its elements to be used
as test cases, the input domain is partitioned into a finite
number of sub-domains for selecting test inputs.
Each sub-domain is known as an equivalence class.
One sub-domain serves as a source for selecting one test
input, any one input from each domain is good enough.
All inputs from one sub-domain have the same effect in the
program, i.e., output will be the same.
We will do equivalence class partitioning in detail in the next
lecture.
Equivalence class partitioning: Example
Consider the AGI and the five partitions that were identified for
equivalence class partitioning.
BVA test cases for the partitions will be as follows:
1 ≤ AGI ≤ 29,500: BVA values will be 0, 1, -1, 1.5, 29,499.5,
29,500, 29,500.5.
AG1 < 1: BVA values will be 0,1,-1, -100 billion.
29,501 ≤ AGI ≤ 58,500: BVA values will be 29,500, 29,500.5,
29,501, 58,499, 58,500, 58,500.5, 58,501.
58,501 ≤ AGI ≤ 100 billion: BVA values will be 58,500,
58,500.5, 58,501, 100 billion, 101 billion.
AGI > 1 billion: BVA values will be 100 billion, 101 billion,
10000 billion.
Decision tables
Rules or Combinations
Conditions Values R1 R2 R3 R4 R5 R6 R7 R8
C1 Y, N, – Y Y Y Y N N N N
C2 Y, N, – Y Y N N Y Y N N
C3 Y, N, – Y N Y N Y N Y N
Effects
E1 1 2 1
E2 2 1 2 1
E3 2 1 3 1 1
Decision table