Lecture - 4
Lecture - 4
Lecture - 4
1
Outline
• White-Box Testing
• Black-Box Testing
2
Cost of Not Testing
3
Cost of Late Testing
60
Assume $1000 unit cost, per fault, 100 faults 0K
50 $25
$3
40 6 0K
Fault origin (%)
30
$2 $10
0K 0K Fault detection (%)
20 $1
3K
$6 Unit cost (X)
10 K
0
t s g n st t t t
en si T e e s e s en
m De it T T ym
ire n io
n
em lo
q u U t t e p
/ a s
Re og e gr S y - D
Pr t st
In Po
❖ Improve quality
❖ Reduce cost
❖ Preserve customer satisfaction
5
Why Do We Test Software ?
6
Black-Box Testing
7
Equivalence Partitioning
▪ We want to select the ‘‘right’’ subset, that is, the subset with the
highest probability of finding the most errors.
8
Equivalence Partitioning
9
Equivalence Partitioning
10
Identifying the Equivalence Classes
12
Practice
13
Practice
14
Boundary Value Analysis
15
Example
For example, say a program specification states that the program
accepts 4 to 8 inputs which are five-digit integers greater than
10,000. You use this information to identify the input partitions and
possible test input values.
16
Limitation
17
Cause-Effect Graphing
18
Circumstances - under which Cause-Effect
Diagram used
19
Steps used in deriving test cases
● Division of specification:
○ The specifications are divided into small workable pieces and then
converted into cause-effect graphs separately.
20
Steps used in deriving test cases
21
Basic Notations used in Cause-effect graph:
The latter two functions (or and and) are allowed to have any
number of inputs
22
Basic Notations used in Cause-effect graph:
23
Example
There are two columns: col1 and col2. The characters in col1 are ‘A’ or ‘B’.
The characters in col2 are digits. In this situation, the file update is made. If
the first character is incorrect, message X12 is issued. If the second character
is not a digit, message X13 is issued. Draw the cause-effect graph for the
given problem.
The causes are:
1—character in column 1 is ‘‘A’’
2—character in column 1 is ‘‘B’’
3—character in column 2 is a digit
The effects are:
70—update made
71—message X12 is issued
72—message X13 is issued 24
Example
25
Constraints used in Cause-effect graph:
26
Constraints Notations:
27
Example
28
Example
29
Benefits
30