TOPIC 02/5112 MINNOT STARTED

How do you know the right answer? Test oracles

A test needs a right answer to compare with. The source of that answer is called an oracle.

L1–L4 are part of the Pro pass

L0 Explain simply

Analogy: the recipe photo. A recipe shows a photo of the finished cake. You bake, look at your cake and compare it with the photo. The photo tells you what to expect. But the photo may be wrong, since the cook may have used a nicer cake. It also cannot show you the taste.

Testing has the same need. Daily List, a to-do list app, lets Lily share a list with friends. Tom, the tester, shares a list with two friends and the screen shows three names. Is that right? He wonders why it should be three and not four. To answer, he needs something that tells him the right answer.

That something is a . It is the source you use to decide whether a result is right, such as a written requirement, or a past version of the app. When no complete source exists, testers meet the , which is the difficulty of knowing the correct result. One way to help is a pseudo-oracle, a second method that gives an independent answer to compare with.

The photo picture has a limit. A recipe photo is one source. A tester often has several, and they can disagree. The photo cannot argue back, but a requirement and a user can.

(SYNTHETIC / TRAINING ONLY: Daily List and every person named in this lesson are invented.)

PICTURE IT

The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.

THE REAL JOB A source of the right answer lets a tester compare a result with what should happen, and it can be wrong or missing.

  1. Name the source of the right answer
  2. Compare the result with it
  3. Ask how far the source can be trusted
  4. If sources clash, ask the owner
Four questions about any right answer

HOW THE PICTURE MAPS

How each part of the picture matches the software
In the pictureIn the software
The recipe photoThe oracle, the source of what should happen
Your own baked cakeThe actual result the app gives
Comparing cake and photoThe test: actual result against expected result
A photo of a nicer cake than the cook madeAn oracle that is wrong or out of date
Taste, which no photo showsThe oracle problem: a source that cannot give the whole answer
Asking a second baker to bake the same cakeA pseudo-oracle: an independent second answer

WHERE THIS PICTURE STOPS

  • A photo is fixed. A requirement or a user can change their mind and argue back.
  • A baker sees the cake in one look. A tester often sees only part of the result.
  • Two bakers can both follow the same wrong recipe, and a pseudo-oracle can share the same wrong idea.

HOOK

Where did the answer come from, and can it be wrong?

REMEMBER IT THIS WAY

A story beat: one picture-line that carries the order or the cause.

Tom shares a list with two friends and the screen shows three names. Before he calls that right or wrong, he asks what source says three.

What each part of the trick stands for
In the trickWhat it stands for
three namesHe wonders why it should be three and not four
what sourceThe test oracle is the source you use to decide whether a result is right

When no complete source exists, no one source settles it, so ask the owner.

TELL A FRIEND

A recipe photo shows what the cake should look like. A tester also needs a source of the right answer, and knows that any source can be wrong.

OFTEN MIXED UP WITH Writing test conditions and test cases. A holds an . Oracles are where that expected result comes from and how far you can trust it.

PRACTISE AND KEEP

Sources for this topic — 4 sources
  1. Market practice

    Glossary of testing terms from the International Software Testing Qualifications Board (equivalence partition, equivalence partitioning, boundary value) ↗ — International Software Testing Qualifications Board (ISTQB) · Glossary of testing terms: test oracle, a source used to work out expected results to compare with the actual result (search excerpt, page not opened)

    The board's glossary of testing terms. Cited for two definitions. An equivalence partition is a subset of a value domain for which a component or system is expected to treat all values the same. A boundary value is the minimum or maximum value of an ordered equivalence partition. · Checked 2026-10-12

    Seen as a search excerpt; the page was not opened. The authoring container could not resolve this publisher's host name when a fetch was tried on 12 October 2026 for related hosts, so this is a reachability gap and not a statement about the publisher. The glossary has an older and a newer version of the entry for equivalence partitioning; the newer one defines the partition rather than the technique.

  2. Market practice

    The Oracle Problem in Software Testing: A Survey (Barr, Harman, McMinn, Shahbaz, Yoo) ↗ — IEEE Transactions on Software Engineering, vol. 41, no. 5, 2015, pp. 507-525 · Barr, Harman, McMinn, Shahbaz and Yoo, 'The Oracle Problem in Software Testing: A Survey', IEEE Transactions on Software Engineering, vol. 41, no. 5, 2015: the oracle problem and the human as the last source (search excerpt, page not opened)

    Open-access copy on UCL Discovery. Peer-reviewed survey; cite for the definition of the oracle problem and for the human as the last source of an oracle. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: 2015, DOI 10.1109/TSE.2014.2372785. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  3. Market practice

    On Testing Non-Testable Programs (Weyuker) ↗ — The Computer Journal, vol. 25, no. 4, 1982, pp. 465-470 · Weyuker, 'On Testing Non-Testable Programs', The Computer Journal, vol. 25, no. 4, 1982: programs with no practical oracle (search excerpt, page not opened)

    The URL is a bibliography entry, not the paper. Cite for the origin of the non-testable program idea; the pseudo-oracle wording in the lesson comes from secondary descriptions in search excerpts. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: 1982. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  4. Market practice

    Using Heuristic Test Oracles (Michael Kelly) ↗ — InformIT · Bolton, 'Using Heuristic Test Oracles', InformIT: oracles are fallible heuristics that suggest a problem (search excerpt, page not opened)

    Practitioner article; cite for the idea that oracles are able to be wrong heuristics that suggest a problem rather than prove one. · Checked 2026-11-06

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: article as listed on the publisher's site. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail. Author attribution corrected from the author’s own bibliography https://www.michaeldkelly.com/articles, opened6 November2026. The InformIT article now redirects to its generic article index; article contents remain excerpt-only.

Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.