QA glossary
What is metamorphic testing?
Metamorphic testing checks how outputs change when the input changes in a known way, instead of checking each output against a fixed expected value. It is used when nobody can say in advance what the exact right answer is, but everyone can say how two answers should relate.
An example from QA practice
Nobody can say exactly which results a product search should return for "red running shoes". The team can still say that adding a filter for size 42 must never return more results than before, and that searching "Red Running Shoes" must return the same results as the lower-case query. Each rule is a metamorphic relation. The tester runs the first query, then the changed one, and the test fails if the relation does not hold.
How it works
- Start from a source test case, ideally one that already passed.
- Apply a metamorphic relation to derive follow-up test cases: a rule that says how a change in the input should show in the output.
- Check the relationship between the outputs, not their absolute values: consistency, monotonicity (output moves in a set direction) or invariance (output stays the same).
This follows the ISTQB AI Testing syllabus (CT-AI v2.0, section 6.1.5) and the Test Analyst syllabus (CTAL-TA v4.0, section 3.3.2).
Its limit
A relation can be wrong or incomplete, and then the tests give false confidence. Metamorphic testing finds relational flaws, not every absolute error, so the syllabus advises combining it with other techniques.
Common questions
When should you use metamorphic testing instead of ordinary tests?
Use it when the right answer for a single input cannot be known in advance, as in search ranking, recommendations, machine learning models or scientific calculations. Where an exact expected result exists, ordinary tests are simpler and stronger. Metamorphic testing adds a check where those tests are not possible.
Can metamorphic tests be automated?
Yes, and they suit automation. The test generates the follow-up input by applying the relation, runs both inputs and compares the outputs, so no person has to judge each answer. The effort goes into choosing good relations, which needs someone who understands what the system should do.
How is metamorphic testing different from property-based testing?
Property-based testing generates many inputs and checks a property of each output, such as a sorted list being in order. Metamorphic testing checks a relation between the outputs of related inputs. The two combine well: a generator makes the source inputs, and the relation is the property that must hold.
How BetterQA does it
Our engineers use relations like these where a client's feature has no single right answer: search, ranking, recommendations and AI output. Failures go into BugBoard with the source and follow-up inputs side by side, so a developer can rerun the pair. Where AI suggests relations or test cases, an engineer reviews every AI-generated result before it is used.