Test Oracles

  • An Oracle is a mechanism to determine whether the program passed or fail a test.
  • A test oracle is a source of expected results for a test case.
  • A test oracle is a method that verifies whether software executed correctly for a test case.
  • Test oracle is used to check the correctness of the output of the program for the test case.
  • Test oracle contain two essential parts:
    • Oracle information that represents expected output.
    • Oracle procedure that compares oracle information with the actual output.

How test oracle used:
Consider testing a process in which test cases are given to the test oracle and to the program under testing.The output of the two is then compared to check if the program behaved correctly for test case.
Test Oracle would have following capabilities:

  • Generating the results from test cases.
  • Comparing the result from test cases.
  • Evaluating the result from test cases.

Examples of Test Oracles:

  • Checking keys before playing a game.
  • Test copy past in MS Word.
  • Test zoom in zoom out function in pain tool.
  • Test slide show in MS Power Point.