Oracle (software testing)
||This article needs more links to other articles to help integrate it into the encyclopedia. (December 2013)|
An oracle is a mechanism used by software testers and software engineers for determining whether a test has passed or failed. 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. The term was first used and defined in William Howden's Introduction to the Theory of Testing. Additional work on different kinds of oracles was explored by Elaine Weyuker. Oracles are often separate from the system under test. Method postconditions are commonly used as automated oracles in automated class testing. The oracle problem is often much harder than it seems, and involves solving problems related to controllability and observability.
Common oracles include:
- specifications and documentation,
- 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)
- a heuristic oracle that provides approximate results or exact results for a set of a few test inputs,
- a statistical oracle that uses statistical characteristics,
- a consistency oracle that compares the results of one test execution to another for similarity,
- a model-based oracle that uses the same model to generate and verify system behavior,
- or a human oracle (i.e. the correctness of the system under test is determined by manual analysis).
- Kaner, Cem; A Course in Black Box Software Testing, 2004
- Miller, Edward; and Howden, William E.; Software Testing and Validation Techniques, Long Beach, CA: IEEE Computer Society Press, 1978 (first edition), pp. 16-19
- Weyuker, Elaine J.; "The Oracle Assumption of Program Testing", in Proceedings of the 13th International Conference on System Sciences (ICSS), Honolulu, HI, January 1980, pp. 44-49
- Jalote, Pankaj; An Integrated Approach to Software Engineering, Springer/Birkhäuser, 2005, ISBN 0-387-20881-X
- Meyer, Bertrand; et al.; "Programs that Test Themselves", IEEE Computer, 42:9 (September 2009), pp. 46-55
- Ammann, Paul; and Offutt, Jeff; "Introduction to Software Testing", Cambridge University Press, 2008, ISBN 978-0-521-88038-1
- Peters, Dennis K. (1995). Generating a Test Oracle from Program Documentation (M. Eng. thesis). McMaster University. CiteSeerX: 10.1.1.69.4331.
- Peters, Dennis K.; Parnas, David L. "Generating a Test Oracle from Program Documentation". Proceedings of the 1994 International Symposium on Software Testing and Analysis. ISSTA. ACM Press. pp. 58–65.
- Hoffman, Douglas; Heuristic Test Oracles, Software Testing & Quality Engineering Magazine, 1999
- Mayer, Johannes; and Guderlei, Ralph; Test Oracles Using Statistical Methods
- Hoffman, Douglas; Analysis of a Taxonomy for Test Oracles, Quality Week, 1998
- Robinson, Harry; Finite State Model-Based Testing on a Shoestring, STAR West 1999
- Binder, Robert V. (1999). "Chapter 18 - Oracles" in Testing Object-Oriented Systems: Models, Patterns, and Tools, Addison-Wesley Professional, 7 November 1999, ISBN 978-0-201-80938-1