An oracle is a mechanism used by software testers and software engineers for determining whether a test has been passed or failed.[1] It is used by comparing the output(s) of the system under test, for a given test case input, to the outputs that the oracle determines that product should have. Oracles are always separate from the system under test.[2]
Common oracles include:
- specifications and documentation,[3]
- other products (for instance, an oracle for a software program might be a second program that uses a different algorithm to evaluate the same mathematical expression as the product under test)
- an heuristic oracle that provides approximate results or exact results for a set of a few test inputs,[4]
- a statistical oracle that uses statistical characteristics,[5]
- a consistency oracle that compares the results of one test execution to another for similarity,[6]
- a model-based oracle that uses the same model to generate and verify system behavior,[7]
- or a human being's judgement (i.e. does the program "seem" to the user to do the correct thing?).[2]
- ^ A Course in Black Box Software Testing, Cem Kaner 2004
- ^ a b An Integrated Approach to Software Engineering, Pankaj Jalote 2005, ISBN 038720881X
- ^ "Generating a test oracle from program documentation", Peters and Parnas, 1994 in Proceedings of the 1994 International Symposium on Software Testing and Analysis
- ^ Heuristic Test Oracles, Douglas Hoffman, Software Testing & Quality Engineering Magazine, 1999
- ^ Test Oracles Using Statistical Methods, Johannes Mayer and Ralph Guderlei
- ^ Analysis of a Taxonomy for Test Oracles, Douglas Hoffman, Quality Week, 1998
- ^ Finite State Model-Based Testing on a Shoestring, Harry Robinson, Star West 1999