Rahul Sharma (Editor)

Oracle (software testing)

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

In computing, software testers and software engineers can use an oracle as a mechanism for determining whether a test has passed or failed. The use of oracles involves comparing the output(s) of the system under test, for a given test-case input, to the output(s) that the oracle determines that product should have. William E. Howden first defined and used the term in this sense in his article "Introduction to the Theory of Testing". Additional work on different kinds of oracles was explored by Elaine Weyuker.

Oracles often operate separately 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
  • a human oracle (i.e. the correctness of the system under test is determined by manual analysis)
  • References

    Oracle (software testing) Wikipedia