Test oracle

Also called: oracle, expected result

A test oracle is the source that tells you what the correct result is: the thing a test compares actual behaviour against.

Every test needs something to compare against. That something is the oracle. It can be an acceptance criterion, a stated business rule, a calculation done by hand, the previous release, a contract with a partner system or a comparable product.

Weak oracles produce weak defects. “The discount is wrong” invites an argument. “The 10% loyalty discount applies to the goods total before delivery, per the pricing rule Product approved, and here it was applied after” gets fixed.

The oracle is also where I draw the line with AI. An assistant can draft checks quickly. It cannot know the business rule, so it must not supply the expected result for anything involving money, compliance or behaviour it cannot observe.

More on this subject: Defect management and backlog hygiene. Written by Marius Ene, senior QA consultant. See how I work with teams or browse all terms.