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 Howden's Introduction to the Theory of Testing. Additional work on different kinds of oracles was explored by Weyuker. Oracles are often separate from the system under test. Method postconditions are commonly used as automated oracles in automated class testing.
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)
- an 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 being's judgment (i.e. does the program "seem" to the user to do the correct thing?).
Famous quotes containing the word oracle:
“There be three things which are too wonderful for me, yea, four which I know not: the way of an eagle in the air; the way of a serpent upon a rock; the way of a ship in the midst of the sea; and the way of a man with a maid.”
—Bible: Hebrew Proverbs, 30:18-19.
From the oracle of Agur, son of Jakeh.