Ch2 Theory
Ch2 Theory
Ch2 Theory
• Fundamental Concepts
– Let P be a program, and D be its input domain.
© Naik & Tripathy
input d.
Theory of Goodenough and Gerhart
• Construction fault
– Performance fault
– Missing control-flow paths
– Inappropriate path selection
– Inappropriate or missing action
• Test predicate: It is a description of conditions
and combinations of conditions relevant to correct
operation of the program.
7
– Fault seeding
– Program mutation
• Fault seeding
– Implant a certain number (say, X) of known faults
in P, and test P with T.
– If k% of the X faults are revealed, T has revealed
k% of the unknown faults.
– (More in Chapter 13)
• Program mutation
– A mutation of P is obtained by making a small
Adequacy of Testing
change to P.
– Some mutations are faulty, whereas the others are
equivalent to P.
– T is said to be adequate if it causes every faulty
mutations to produce unexpected results.
– (More in Chapter 3)
11
their absence.
• Faults are detected by running P with a small
test set T, where |T| << |D|, where |.| denotes
the “size-of” function and “<<“ denoted
“much smaller.”
– Testing with a small test set raises the concern of
testing efficacy.
– Testing with a small test set is less expensive.
• The result of each test must be verified with
a test oracle.
Limitations of Testing
• Limitations of Testing
• Testing is performed with a test set T, s.t. |T|
<< |D|.
• Dijkstra’s observation
• Test oracle problem