Data & evidence

Create synthetic restaurant test data with explicit coverage

By Anurag · Published 4 November 2026 · Updated 17 November 2026Global methods · Country rules separately scoped
Constructed learning material. Prepared with AI assistance. Sample businesses, records and outcomes are fictional. External sources support the named methods or scoped facts; they do not validate the sample values as benchmarks.

A thousand plausible-looking restaurant records can miss the one boundary that breaks an important report. A small deliberately constructed dataset can be more revealing when every record has a purpose, an independently calculated expected outcome and a known failure mechanism. Realism and test coverage are different properties.

This guide builds an original eighteen-row fixture portfolio for a fictional order-summary contract. Twelve independent cases test accepted-order selection, net amounts, duplicate identities, units, numeric boundaries, zero values and empty populations. Twelve intentionally changed implementations provide a separate challenge: can the selected fixtures detect the particular behaviour each change introduces?

The complete portfolio detects eleven of the twelve listed changes. The remaining change removes a nonnegative-gross check, but another retained condition still rejects every negative gross amount under the declared input contract. That survivor is a useful learning case: an undetected mutation can be behaviourally equivalent within scope, while a high mutation percentage can still conceal an untested requirement.

All orders, amounts and expectations in the complete fixture specification and independent answers are invented from first principles. They contain no transformed customer records. The local tool tests a small teaching function and its named variants. It does not certify a production system, prove privacy for data derived from real people or claim that a passing score establishes universal correctness.

TRY THE CASE

Realistic rows and a high detection fraction do not prove complete coverage

Fictional inputs and stated model boundaries. The worked calculations and downloadable records below remain available without JavaScript.

State the exact record, identity, unit and summary behaviour contract → Invent purpose-specific fixtures with independent acceptance/value expectations → Keep normal, invalid and boundary populations separately identified → Verify the unchanged function against the oracle before interpreting variants → Compute the fixture-by-variant matrix rather than a realism score → Investigate survivors and document any bounded equivalence proof → Compare mutation-cover optimisation with the complete requirements portfolio → Preserve deterministic provenance, oracle changes and actual remaining gaps
  1. State the exact record, identity, unit and summary behaviour contract
  2. Invent purpose-specific fixtures with independent acceptance/value expectations
  3. Keep normal, invalid and boundary populations separately identified
  4. Verify the unchanged function against the oracle before interpreting variants
  5. Compute the fixture-by-variant matrix rather than a realism score
  6. Investigate survivors and document any bounded equivalence proof
  7. Compare mutation-cover optimisation with the complete requirements portfolio
  8. Preserve deterministic provenance, oracle changes and actual remaining gaps
Follow the evidence through the decision. Each gate belongs to this constructed case. Download the diagram.

1. Define the behaviour before generating data

The teaching function accepts structured order records with a case-sensitive identity, an explicit MU unit, accepted or cancelled status, integer gross minor units and integer discount minor units. Gross and discount must be nonnegative safe integers, and discount cannot exceed gross. Record identities must be unique within the supplied case.

Cancelled records are validated but excluded from the summary. Accepted records contribute gross minus discount to selected net minor units and one to the eligible-order count. A zero-value accepted order still contributes one order. The arithmetic average is selected net divided by eligible-order count, with no claim that it is an accounting posting rounded to a currency unit.

When no accepted orders remain, selected net is zero and the average is unavailable, represented by null. The aggregate net must remain within the safe-integer range supported by the teaching implementation. An individually valid amount does not make an overflowing aggregate valid.

These are original educational rules, not a claim that every restaurant should treat cancellations, discounts or identifiers this way. The function is intentionally small so readers can reconstruct its expected behaviour. The framework's value is in connecting explicit requirements to counterexamples, rather than hiding a complicated production definition behind a collection of attractive sample rows.

2. Keep the fixtures independent

Each fixture is a separate input population. F01's order A and F03's order A do not belong to one combined export, and repeating an identity across different fixture cases is not a duplicate within a case. The CSV includes both fixture identity and row identity so that distinction survives downloading and inspection.

The twelve cases contain eighteen rows in total. That total describes the material in the portfolio, not a sample from a restaurant population. It provides no statistical estimate of real defect frequency or user behaviour. A deliberately invalid row is useful evidence for a validation test, even though it is not a plausible accepted production record.

Keep the raw input, expected acceptance or refusal, expected returned values and rationale together. A fixture named bad data without a declared expected outcome is difficult to review. A future developer may fix the data instead of preserving the failure condition the test was designed to exercise.

The portfolio has a deterministic specification identifier rather than an invented claim of random representativeness. Its generator records exact fixed values. No pseudorandom seed can make an unspecified requirement appear automatically; if random extensions are added later, retain their generator, seed, parameters and discovered counterexamples separately from the fixed known-answer cases.

3. Reconstruct the normal net-amount case

F01 has three accepted orders. A has gross one thousand and discount one hundred; B has gross two thousand and discount two hundred; C has gross five hundred and discount fifty. Their selected nets are nine hundred, eighteen hundred and four hundred and fifty minor units.

The correct selected total is 3,150, eligible-order count three and arithmetic average 1,050. A changed implementation that sums gross instead of net returns 3,500. The three-hundred-and-fifty difference is exactly the supplied discounts. This is the expected counterexample for the net-amount requirement.

F01 is a useful positive case, but it cannot test everything. It contains no cancelled records, duplicate identities, missing units or zero amounts. Passing it says that one ordinary accepted population produced the expected result, not that the entire contract has been exercised.

A synthetic generator producing many copies of F01 with different amounts could increase row count dramatically while preserving those coverage gaps. The designer needs to vary the properties relevant to failure mechanisms. More plausible orders are not automatically more useful tests when they all follow the same successful path.

4. Test selection with a mixed status population

F02 contains one accepted order with gross one thousand and no discount, plus one cancelled order with gross nine thousand and no discount. The correct result is one eligible order, selected net one thousand and average one thousand. The cancelled row must not enter either numerator or denominator.

A changed implementation that includes cancelled records returns two orders and ten thousand net, with average five thousand. The deliberately large cancelled amount makes the error easy to identify, but magnitude is not the requirement. A smaller cancelled amount would still need exclusion under the stated rule.

Validate cancelled rows before excluding them. Otherwise an invalid unit or duplicate identity can disappear behind a status filter and leave the supposedly accepted evidence population ambiguous. The teaching contract explicitly defines this order of responsibility. Another production contract may choose a different staging design, but it must state what an excluded row means and which validation still applies.

The mixed case is different from an all-cancelled case. It verifies the relationship between retained and excluded records within one population. A test proving that zero accepted records produce an unavailable average does not, by itself, explain how a mixed population should contribute to the summary.

5. Preserve duplicate identity as a refusal case

F03 contains two accepted records with identity A and the same one-thousand gross amount. The expected outcome is refusal because the case's current-state identity contract requires uniqueness. The test does not assume that an identical payload makes a repeated identity acceptable.

An actual integration might recognise exact transport retries before forming its effective current-state population. That would be a separately defined stage. This teaching summary receives a population already declared unique, so silently deduplicating or counting the repeated row would conceal a contract failure.

The intentionally changed duplicate-permitting implementation returns two eligible records and two thousand net. Its behaviour differs from the expected refusal, so F03 detects it. The comparison evaluates acceptance and returned values; it does not depend on the exact wording of an error message.

The PostgreSQL constraints reference describes mechanisms such as uniqueness, not-null and row checks in its database context. Those concepts help explain explicit constraints, but they do not automatically enforce this complete application contract. In particular, an ordinary row check does not establish every arbitrary aggregate or cross-row property.

6. Test a missing unit without inventing a default

F04 has one otherwise ordinary accepted record whose unit is blank. The expected outcome is refusal. A numeric value of one thousand cannot establish whether the source means minor units of MU, another currency or a different scale. The unit must be supplied under the contract.

The changed default-unit implementation fills the blank with MU and returns a valid-looking one-thousand result. F04 detects that difference. The fixture does not prove that all defaults are wrong in every system; it proves that this particular default violates a contract requiring an explicit supplied unit.

Do not create the expected answer by applying the same default in a test-data helper. If both the actual function and its oracle silently supply MU, the test can pass while the requirement disappears. Independent expected outcomes need to reflect the declared rule, including refusal states.

In an actual company adaptation, supported metadata might establish a unit for a whole file rather than every row. That could be a valid different contract with an explicit transformation. Keep the teaching fixture unchanged and add a separately named file-level-unit case instead of rewriting F04 until the current implementation passes.

7. Challenge amount ranges and numeric precision

F05 has gross one thousand and discount eleven hundred. The expected outcome is refusal because discount exceeds gross. A changed implementation that omits the cap returns negative one hundred selected net. That is an intentionally exposed wrong acceptance under this contract, not a legitimate refund record or a claim about actual platform discount rules.

F06 supplies a fractional gross amount of 1000.5 minor units with zero discount. The teaching contract requires whole minor units, so it refuses the input. A changed implementation that rounds first turns it into a different valid-looking integer and accepts it. Rounding away the invalid input is the failure mechanism this fixture targets.

F10 supplies a negative gross amount with zero discount. Its expected outcome is refusal as well. A negative transaction can have a valid meaning in another model, but this summary's gross-order field does not accept it. A signed refund ledger would need an appropriate separate record type and relationship rather than force the value into a nonnegative gross field.

These cases illustrate why data generation should preserve field semantics. A random negative value is not useful merely because it looks adversarial. It becomes a test when the contract identifies whether the value should be accepted, rejected or interpreted under a different record type, with an independently specified expected result.

8. Distinguish a zero-value order from an empty population

F07 contains one accepted order with gross zero and discount zero. The correct eligible count is one, selected net zero and average zero. A changed implementation that drops zero-value accepted records returns no eligible orders and an unavailable average instead. The amount sum alone would still be zero, hiding the count error.

F08 contains one cancelled order with a valid positive gross amount. Its correct result is zero eligible orders, selected net zero and average null. A different changed implementation returns average zero for this empty eligible population. That result wrongly suggests a defined rate over a denominator that does not exist.

The two cases form a useful contrast. Both have selected net zero, but their denominators and average states differ. A test suite asserting only the total would miss both mutations. The oracle must inspect the count and unavailable-state representation as well as the amount.

An empty input array also produces zero eligible orders and an unavailable average under the teaching function. That is an additional boundary test, not a nineteenth supplied row. The distinction between input records and eligible population remains explicit, making it possible to expand tests without misreporting the material's row count.

9. Preserve case-sensitive identity meaning

F09 contains identities Ab and ab with accepted gross amounts one hundred and two hundred. Under the declared case-sensitive string contract they are distinct, producing two eligible orders, selected net three hundred and average one hundred and fifty.

The changed case-folding implementation lowercases identities before checking uniqueness. It then sees a collision and refuses the case. F09 detects that behaviour because the correct outcome is acceptance. A test can catch an incorrect refusal as well as an incorrect acceptance.

This does not recommend case sensitivity for every real identifier. The actual source contract determines whether values differing only by case represent one identity or two. A normalization can be appropriate when explicitly supported; it can also merge records incorrectly when introduced as a convenience without that support.

Store identifiers as identifiers, not display text to be tidied until it looks consistent. Trimming, case folding, punctuation removal and numeric conversion can each change identity. A company should add known-answer fixtures for its actual canonicalization rule and preserve cases that must remain distinct.

10. Refuse an unknown status explicitly

F11 supplies one record with a status outside accepted and cancelled. Its unit and amount are otherwise valid. The expected outcome is refusal because the function cannot determine the record's eligibility under its declared status vocabulary.

The changed implementation treats an unrecognised status as accepted and returns one order with its amount. This is a common kind of permissive fallback worth testing: an integration can remain operational while its business interpretation becomes wrong after a new source state appears.

A production system may choose a quarantine stage or a supported not-applicable treatment instead of rejecting the whole batch. That is a different workflow with its own scope and evidence. It must not quietly translate every new status into the most convenient existing state and keep the output labelled complete.

The fixture isolates the status field so the reason for refusal is clear. If the same row also had a missing unit and invalid amount, a refusal would not establish that the status mechanism was tested. Several invalid fields can be useful for another robustness question, but they make a single-mechanism counterexample harder to interpret.

11. Test aggregate limits beyond individually valid rows

F12 contains two accepted records, each with gross 4,503,599,627,370,496 minor units and zero discount. Each supplied amount is a safe integer in the JavaScript representation used by the teaching implementation. Their exact combined amount is 9,007,199,254,740,992, outside its safe-integer aggregate contract.

The expected outcome is refusal of the aggregate. This is a deliberately extreme synthetic boundary, not a plausible restaurant receipt or an industry-scale benchmark. Its purpose is to expose a numeric assumption that ordinary small values never reach.

The changed unchecked-total implementation accepts the two rows and returns an unsupported aggregate. F12 detects that difference. An individually valid field constraint cannot replace the check on the accumulated result. A future implementation using an appropriate exact integer representation might support a wider range, but that would require a revised numeric contract and corresponding expected values.

The independent answer is calculated with arbitrary-precision integer arithmetic in the dataset generator. The oracle does not ask the same unsafe sum to decide whether it is safe. This is a concrete example of choosing a verification method that can represent the boundary the implementation must reject.

12. Use intentional implementation changes to challenge the suite

The portfolio includes twelve named changed behaviours: gross instead of net, cancelled inclusion, duplicate permission, missing-unit default, excess-discount acceptance, input rounding, zero-order dropping, zero average for an empty population, case-folded identity, removal of one negative-gross check, unknown-status acceptance and unchecked aggregate range.

Each variant changes a defined mechanism in the small teaching function. These are hand-written counterexample implementations, not automatically generated Java bytecode mutations. Their purpose is to make failure detection inspectable. They should never be loaded into a live reporting path or presented as alternative recommended business rules.

PIT's basic mutation-testing concepts describe running tests against changed implementations and distinguish detected, surviving and equivalent changes in its tool context. That supports the terminology here. It does not validate this particular portfolio or imply that the local JavaScript laboratory has the full capabilities of PIT.

For every fixture and variant, compare acceptance or refusal and, when accepted, eligible count, selected net and average. Exact error wording is outside this comparison contract. The model returns the resulting detection matrix so a reader can inspect which case exposes which wrong behaviour instead of trusting one headline percentage.

13. Reproduce the full detection matrix

F01 detects gross-instead-of-net. F02 detects cancelled inclusion. F03 detects duplicate permission, F04 the unit default, F05 excess-discount acceptance and F06 input rounding. F07 detects dropping zero-value orders, while F08 detects both cancelled inclusion and the zero-empty-average mutation.

F09 detects case-folded identity, F11 unknown-status acceptance and F12 unchecked aggregate range. F10 detects none of the listed variants under the chosen acceptance-and-value comparison. It still checks a declared negative-gross refusal case against the independent expected outcome.

With all twelve fixtures selected, eleven named variants are detected and one survives. The raw detection fraction is eleven twelfths, approximately 91.667%. That number describes only these twelve named changes and these selected tests. It is not a probability that the implementation is correct or that a production defect will be caught.

Keep the row-level matrix available. A change from eleven detected variants to ten can come from removing the only aggregate-overflow fixture, not from a broad deterioration in every test. The matrix identifies the specific lost mechanism and makes a targeted remedy possible without generating thousands of unrelated records.

14. Investigate the equivalent survivor instead of gaming a score

The surviving variant removes the explicit requirement that gross be nonnegative, but retains nonnegative discount and discount no greater than gross. Those remaining inequalities imply that gross cannot be negative in any accepted record: gross must be at least discount, and discount must be at least zero.

Therefore removing that one check does not change accepted outputs under the declared input contract and comparison scope. F10's negative gross is still refused by the retained discount-cap condition. A new fixture cannot expose a different accepted value without changing another contract assumption.

This is a bounded logical argument for behavioural equivalence of the named variant. It is not a claim that every surviving mutation is equivalent or that the explicit check should be deleted from production. Clear validation messages, maintainability and future contract changes may justify retaining a redundant guard even when its current acceptance set is unchanged.

The calculator lets a reader distinguish raw survivors from a separately reviewed equivalent classification. Selecting that classification displays the supplied proof scope; it does not make an arbitrary survivor equivalent by checkbox. The reviewed nonequivalent set contains eleven variants, all detected by the full suite, while the raw twelve-variant fraction remains visible.

15. Compare a happy-path suite with the full portfolio

Select only F01. The normal function returns the expected three orders and 3,150 net. The suite detects the gross-instead-of-net variant but none of the other eleven listed changes. It has exercised one named fixture objective and exposed one specific defect mechanism.

This does not make F01 a poor test. It is a strong small test for its stated purpose. The problem would be calling it a complete acceptance suite because it uses realistic amounts and passes reliably. A company needs the rest of its risk-to-fixture mapping to know which important behaviours remain unchallenged.

Now select the full portfolio except F12. Ten raw variants are detected, while the aggregate-range defect survives along with the equivalent negative-check removal. The missing F12 risk is visible in the selected-fixture map and the mutation matrix. Adding another ordinary F01-style order cannot repair that gap.

The user should be able to explain the difference between a missing test, an equivalent variant and an untested defect not represented by any listed variant. The calculator only measures the declared challenge set. An unknown real defect can remain outside it even when every reviewed nonequivalent mutation has been detected.

16. Find a small detecting suite without confusing it with full requirements

Ten fixtures can detect all eleven reviewed nonequivalent variants: F01, F03, F04, F05, F06, F07, F08, F09, F11 and F12. F08 already detects cancelled inclusion, so F02 is unnecessary for this particular mutation-cover objective. F10 detects no listed variant under the comparison scope.

The tool can enumerate the small fixture subsets and find that ten is the minimum count for this specified detection matrix. That is an exact finite set-cover result for twelve cases and eleven targets, not an optimisation of every testing objective. It says nothing about execution cost, diagnostic clarity or missing requirements beyond those targets.

Removing F02 loses the explicit mixed-status population example even though a cancelled-inclusion mutation is still detected by F08. Removing F10 loses the direct negative-gross refusal fixture. Both can remain valuable requirements tests and documentation. A mutation-minimal suite is not automatically the preferred complete company test portfolio.

This distinction helps a team avoid optimizing a metric at the expense of learning. Keep the complete known-answer portfolio where its cost is modest, and use targeted subsets for a clearly defined fast check if appropriate. Name the subset's purpose so a short pre-change smoke test is not mistaken for the entire release evidence.

17. Add metamorphic checks where a single expected number is insufficient

Reordering valid records must not change eligible count or selected net. Reordering a duplicate case must still produce refusal. These relations test dependence on input order without requiring a new business population. They complement, rather than replace, the independently calculated fixture answers.

For a valid accepted record, increasing both gross and discount by the same supported whole amount leaves its net unchanged. Its eligible count remains one. The changed gross-instead-of-net variant can violate that relation. The transformation must preserve every input constraint, including numeric bounds, rather than create an invalid record and then claim the original relation failed.

Splitting one accepted order into two new identities preserves selected net only if the split amounts and discounts sum appropriately, but it changes the eligible-order count and therefore usually the average. This is a useful negative relation: an implementation must not treat amount conservation as proof that every output stays invariant when the order grain changes.

The downloadable extensions include both transformations with explicit expected outputs. They are not additional rows in the eighteen-row core portfolio. Keeping core fixture counts and extension cases separate makes the evidence easy to reconcile while supporting more advanced reasoning about what the function should preserve.

18. Keep synthetic construction distinct from de-identifying real records

The portfolio is synthetic because its values and identities were invented directly to exercise rules. It is not a sample of real orders with names removed. That construction avoids needing actual customer data to reproduce a duplicate, missing unit or numeric overflow.

If an organisation derives test data from real records, it faces a different question about the resulting information and appropriate handling. The ICO pseudonymisation guidance explains, in its UK context, why replacing identifiers does not automatically make information anonymous. This page does not assess a real derived dataset's legal or privacy status.

Realistic-looking does not require real. A data designer can create meaningful relationships, invalid states and rare boundaries without copying actual receipts or staff identifiers. Conversely, changing a restaurant name while preserving a real individual's unusual pattern would not make that information an independently invented fixture.

Record how the data was made and what it is intended to test. That provenance helps reviewers understand both its utility and its limits. A seed or file hash can identify a generation version, but it cannot by itself establish privacy protection, adequate coverage or correctness of the expected answers.

19. Design a clear interactive fixture workpaper

The first view should name the selected suite and show which fixture objectives are represented. Expand a case to inspect its original rows, expected outcome, normal-function result and detected variants. Keep refusal cases readable rather than replacing them with a generic system error panel.

A second view shows the fixture-by-variant detection matrix and raw surviving variants. A separate reviewed-equivalence explanation identifies the negative-check removal and the exact inequalities supporting its classification. The raw detection fraction should remain visible so the reviewed denominator is not silently changed to produce a more attractive percentage.

Scenario controls select the complete portfolio, F01 alone, the portfolio without aggregate overflow, or the small mutation-cover subset. They do not generate random production-looking rows or rewrite expected outcomes when a test fails. The useful interaction is seeing which mechanism becomes unchallenged when a specific fixture is absent.

Reset restores the original portfolio and reviewed challenge set. The page executes only the small pure teaching functions locally. It does not inspect a repository, run arbitrary code, upload datasets or replace a company's actual release checks. Its scope is explicit so the institutional framework remains understandable and reproducible.

20. Test the tester and preserve the oracle

Before relying on mutation results, check that the unchanged normal function meets every independent fixture expectation. If F01's expected net were accidentally edited from 3,150 to 3,500, the normal function should fail the oracle check. A matrix that still reports success would reveal a test harness that compares implementations only with each other rather than with the declared contract.

The equivalent survivor must remain undetected under acceptance-and-value comparison for every core fixture, while the other eleven variants must each be detected by at least one case. Removing F12 must expose the unchecked-total gap. Reversing case or row order must not change which variants are detected, although output lists should use a stable documented order.

Reject duplicate fixture identities, unknown variant names and malformed expected outcomes. Confirm that running a variant does not mutate the source rows before another variant uses them. A rounding variant applied in place could otherwise repair F06 for all later tests and corrupt the experiment.

The expected answers and generator remain separately inspectable. A changed contract needs a new specification version and a review of which old fixtures still apply. Do not overwrite every expected value with the current implementation's output to make the suite green. That operation would remove the independent oracle while preserving the appearance of testing.

21. Work through the metamorphic extensions numerically

Start with F01's A gross one thousand and discount one hundred. Increase both by one hundred, making gross eleven hundred and discount two hundred. A's net remains nine hundred, so the whole population still has three eligible orders, selected net 3,150 and average 1,050. This transformed case preserves the declared meaning while changing a superficial input value.

The gross-instead-of-net variant moves from 3,500 to 3,600 because it ignores the additional discount. Its output changes by one hundred while the correct output does not. That relation gives a reviewer another way to understand the mechanism, rather than only remembering that F01's published answer is 3,150.

Now split A into two new distinct identities. A1 has gross six hundred and discount sixty, giving net five hundred and forty. A2 has gross four hundred and discount forty, giving net three hundred and sixty. Together they preserve A's original gross, discount and nine-hundred net. With B and C unchanged, selected net remains 3,150 but eligible count becomes four and average becomes 787.5 minor units.

The half-minor-unit average is a valid arithmetic mean under this teaching contract, not a posted monetary amount. The exact expected fraction is 1,575 divided by two. A reporting implementation must not force every statistical average into an integer merely because its input amounts are integer minor units. Any display rounding is a separately named presentation rule, not a change to the underlying expected mean.

For a third extension, add one accepted zero-value order to the original F01. The result again has four eligible orders, net 3,150 and average 787.5, but the input transformation is different from splitting A. A zero-dropping variant fails this extension by returning three and 1,050. Identical aggregate answers from two extensions do not make their challenged mechanisms interchangeable.

These worked transformations are stored outside the eighteen-row core count. Each has its own input description and expected output. A future generator can reproduce them from fixed original values, while a reviewer can calculate them independently. This preserves a readable small core portfolio and makes the relational checks concrete enough to audit.

22. Challenge an overfitted implementation and a corrupted oracle

Consider a separate deliberately wrong function that sums gross and subtracts the constant three hundred and fifty. It passes F01's selected-total expectation because gross 3,500 less that constant equals 3,150. It is not one of the twelve challenge variants and is not included in the reported detection fraction.

Apply the equal-gross-and-discount increase from the previous section. The correct selected net remains 3,150, but the hard-coded compensation returns 3,600 less three hundred and fifty, or 3,250. The extension exposes a function that memorised a fixture-specific adjustment rather than implemented the contract. A familiar expected total is not enough to establish the underlying relationship.

Now corrupt the oracle instead: change F01's expected net to 3,500 and expected average to 3,500 divided by three, leaving its rows unchanged. The normal function should disagree with that expectation, while the gross-instead-of-net variant now happens to match it. If the harness ignores its normal-function oracle check, it can reward exactly the wrong behaviour.

The interactive oracle-change scenario makes that failure visible and withholds a usable detection summary while the reference no longer agrees with the selected expected outcomes. It retains the mismatch evidence so the reader can investigate whether the contract, expectation or implementation is wrong. A green percentage calculated from an untrusted oracle is not useful release evidence.

This is why expected-answer maintenance deserves review. A changed output can be an intended contract revision, a fixed bug or a newly introduced defect. Automatically accepting the current output as the new answer removes the independent question the test was meant to ask. Preserve the old version, explain the change and independently reconstruct the new expected relationship before treating the updated suite as evidence.

There is also an explicit gap outside the twelve listed changes. None of the eighteen core rows supplies gross as numeric text. A different faulty adapter could convert every gross field with a permissive numeric conversion before validation. It would agree with the normal function on these core cases while accepting the string containing the digits 1000, which the structured-input contract requires to be a numeric integer instead.

The extension pack therefore includes one such numeric-text record with an expected refusal. The unchanged teaching function rejects it; a coercion-before-validation adapter would need a separate challenge test. This extension is deliberately outside the twelve-fixture and twelve-variant fractions, so the reported core coverage is not silently expanded. It demonstrates a practical limit of even the reviewed eleven-of-eleven detection result: the challenge catalogue can be incomplete. When a new relevant mechanism is identified, add an independently specified case and version the portfolio instead of claiming the old percentage already covered it.

23. Hand over a portfolio that explains its coverage

Give a colleague the eighteen rows grouped by fixture and the behaviour contract without the answers. Ask them to reconstruct F01, the zero-versus-empty contrast, the case-sensitive pair and the aggregate-overflow refusal. Then ask which single change each case was designed to expose and what remains outside its purpose.

Next provide the detection matrix. They should explain why eleven twelfths is not a correctness probability, why the negative-check survivor has a bounded equivalence argument and why the ten-case mutation-cover subset does not replace every requirement fixture. A useful explanation can connect each reported count to its actual target population.

The final company record names the contract version, fixture provenance, independent expected outcomes, selected suite, challenge variants, equivalent-review rationale and remaining gaps. It can support a release discussion without claiming to certify the whole application. The practical value is a small body of data that makes a specific wrong result fail visibly and lets the next reviewer reproduce why.

Research sources and scope

Build on the foundations

These introductory resources are already available in the existing website library.