Lecture Notes for CS 325
Testing, 20 March 2000
- testing as an activity itself, instead of an add-on
- testing is dynamic analysis - running programs over data, getting output
- divide and conquer and re-assemble (or integrate)
- basics
- error, fault, failure
- error - a program corruption (noun), a human activity (verb)
- faults - the condition that results from executing an error
- failures - the external manifestation of a fault; observation
- errors imply faults, but faults do not necessarily imply failures
- it is only in their observation that faults imply failures
- the absence of observable failures does not imply the absence of
faults or errors
- testing can show the presence of errors, never their absence
- finding failures - testing
- finding faults - debugging
- finding errors - maintenance
- what is correctness
- correctness is expected behavior
- oracles establish and measure expected behavior
- specification provide the basis for establishing correctness
- human or automated oracles
- automated oracles good at measuring correctness
- human oracles are good at establishing correctness
- top-down and bottom-up testing
- it is difficult to cover failures in large programs
- it is difficult to find faults and errors in large programs
- divide and conquer
- divide into a hierarcy of modules
- test top-down; drivers
- test bottom-up; stubs
- testing should follow implementation - parallel development
- test cases and criteria
- test cases try to drive the system to faults
- test cases are costs - to develop, to run
- exhaustive test case - ideal but impractical due to costs
- execute all possible inputs is a testing criterion; other criteria
include execute all statements, execute all paths, execute all
branches
- specify the test criteria; generate the test cases to meet the
criteria
- a reliable test criterion results in test cases that find faults
- a valid test criterion triggers every fault with a test case
- valid and reliable test cases result in perfect tests - which are
impossible
- other criteria properties
- criteria should apply to any program and spec (applicability)
- structure influences test set coverage (antiextensionality)
- modularity influences test set coverage (antidecomposition)
- composition influences test set coverage (anticomposition)
- these properties don't guarentee good test sets, just less bad ones
- selecting criteria is hard
- selecting test cases is hard
- use lots of poor ones rather one good one
- testing psychology
- creativity is an important factor
- the soul of a sadist
- show programs are broken, not that they're working
- independent testing
This page last modified on 21 March 2000.