A test oracle is a document, or piece of software that allows testers to determine whether a test has been passed or failed.
A program, or a document that produces or specifies the expected out- come of a test, can serve as an oracle [5]. Examples include a specification (especially one that contains pre- and postconditions), a design document, and a set of requirements. Other sources are regression test suites. The suites usually contain components with correct results for previous versions of the software. If some of the functionality in the new version overlaps the old version, the appropriate oracle information can be extracted.
A working trusted program can serve as its own oracle in a situation where it is being ported to a new environment. In this case its
intended behavior should not change in the new environment.