TOPIC 40/5115 MINNOT STARTED

Metamorphic testing: checking relations when you cannot know the answer

When you cannot know the right answer, you can still know how two answers must relate. Metamorphic testing checks that relation after a known change to the input.

L1–L4 are part of the Pro pass

L0 Explain simply

Analogy: adding a known weight to a crate. You do not know the crate's exact weight. Add a known 5-kilogram weight without changing anything else. The reading should rise by 5 kilograms. That relation can reveal a fault even without the original weight.

Daily List is a to-do list app. Its search box returns tasks, and the order depends on a score nobody can predict in advance. Tom, the tester, cannot write the exact right list for every query.

He uses , checking a rule that links the results of related inputs, when the exact answer is unknown. Each rule is a , a rule saying how the output must change when the input changes in a known way. The second test is the follow-up test, the test built from the first by a known change, whose result is compared with it.

For example: adding one more word to the query can never add results. If the follow-up search returns a task that the first one did not, the relation is broken. Tom has found a fault without knowing the right list.

The picture has a limit. The crate check assumes the added weight is known and the weighing conditions stay the same. In software, a relation holds only if the product really should behave that way.

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

PLAIN WORDS · 1 in this section
metamorphic
changing form; here, a rule about how results change

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 Checking a rule between the results of related inputs, when the exact answer is unknown.

  1. Change the input
  2. Predict the link
  3. Compare
Three steps

HOW THE PICTURE MAPS

How each part of the picture matches the software
In the pictureIn the software
You cannot weigh one whaleThe exact answer is unknown
Two equal-mass whales weigh twice either oneThe metamorphic relation
Adding a second whaleThe follow-up test

WHERE THIS PICTURE STOPS

  • Whales always double. A relation must really hold for the product.
  • A scale tells you if the rule fails. A product may fail the rule for good reasons.
  • Two whales prove nothing about one. A wrong product can obey a relation.

HOOK

Change the input, predict the link, compare.

REMEMBER IT THIS WAY

A rule of thumb: if you see this, think that.

If you cannot know the right answer, change the input in a known way and predict the link between the two results.

What each part of the trick stands for
In the trickWhat it stands for
Known changeAdding one more word to the search
Predicted linkThe metamorphic relation, how the output must change

A weak relation may pass while both results are wrong.

TELL A FRIEND

uses an agreed relation, such as two equal masses adding to twice one, without needing the unknown mass itself.

OFTEN MIXED UP WITH How do you know the right answer? Test oracles. The oracle lesson asks how to judge a result. This lesson gives a way to judge when the exact result is unknown.

PRACTISE AND KEEP

Sources for this topic — 7 sources
  1. Market practice

    Metamorphic Testing: A Review of Challenges and Opportunities (Chen and others, ACM Computing Surveys, 2018) ↗ — Association for Computing Machinery (ACM Computing Surveys) · Metamorphic testing both generates test cases and checks results; its core is a set of metamorphic relations, properties a function must satisfy across related inputs and their outputs (search excerpt of the abstract, full text not seen)

    Per the search excerpt (abstract only), metamorphic testing both generates test cases and checks results, and rests on metamorphic relations: properties a function must satisfy across related inputs and their outputs. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: ACM Computing Surveys, vol. 51, no. 1, article 4, 2018. 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.

  2. Market practice

    Metamorphic testing (Wikipedia) ↗ — Wikipedia · Uses sin(pi - x) = sin(x) as the standard example: build the follow-up input from the first and check the two outputs agree; the same identity also passes a broken sine that always returns zero (search excerpt of a community encyclopedia and a forum thread, pages not opened)

    Per the search excerpt, uses sin(pi - x) = sin(x) as the standard example: build the follow-up input from the first and check that the two outputs agree. A forum thread in the same search warned that the identity also passes a broken sine that always returns zero. A community encyclopedia, so a secondary source. Practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. 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

    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 · The oracle problem is the difficulty of deciding whether a result is correct (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.

  4. Market practice

    On Testing Non-Testable Programs (Weyuker) ↗ — The Computer Journal, vol. 25, no. 4, 1982, pp. 465-470 · Origin of the idea of a program whose correct output cannot be known in advance (bibliography entry; wording from secondary descriptions in search excerpts)

    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.

  5. Market practice

    QA Glossary (Mozilla wiki) ↗ — Mozilla · Back-to-back testing: two or more variants of a component or system are run with the same inputs, and the outputs are compared and analysed when they differ (search excerpt, page not opened)

    Cited for the plain definition of back-to-back testing: variants run on the same inputs and outputs compared. · Checked 2026-10-25

    Found through a web search; the page was not opened (search excerpt, page not opened). The standard text is sold, so put any detail in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  6. Market practice

    Regression vs. Back-to-Back Testing: Which One to Choose in TPT? (Synopsys blog) ↗ — Synopsys · The main difference from regression testing is the oracle: back-to-back testing treats the behaviour of another version as the expected result (search excerpt, page not opened)

    Cited for the point that back-to-back testing uses another version's behaviour as the expected result. A vendor blog post about its own tool, read as one view. · Checked 2026-10-25

    Found through a web search; the page was not opened (search excerpt, page not opened). The standard text is sold, so put any detail in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  7. 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 entry for back-to-back testing: running the same test cases on two or more variants of a test item, or a simulation model of it, and comparing the results (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.

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.