# Validating AI-generated test assertions

> Check a generated assertion against independently known values. See whether it detects a faulty implementation and trace its expected result to a source.

Source: https://cueapril.com/playbooks/validate-generated-test-oracles
Updated: 2026-12-01
Index: https://cueapril.com/llms.txt

## Are the tests checking the requirement or simply repeating the implementation?

Write the expected result independently before inspecting the generated test. A meaningful assertion must fail for a known wrong result and pass for the right one.

A delivery rule grants free shipping at exactly the threshold.

## Work through the decision

Generated tests use a higher amount and a lower amount. Both can pass with the wrong inequality at the boundary.

Steps and evidence for the reviewer

| Step | Evidence to keep |
| --- | --- |
| Name the business rule | Write one sentence whose truth can be checked. |
| Introduce a counterexample | Use the exact threshold as a hidden input. |
| Challenge the assertion | Run against both implementations and store the two outcomes. |

## What changes the decision

Keep tests that distinguish correct from faulty behaviour. Where no one can agree on the expected result, return the question to the requirement owner.

## Primary documentation

- [Worked example with two AI-written regression tests](/guides/agentic-software-testing)

By Cue April. Updated 2026-12-01.

## Related

- [Evaluation playbooks](https://cueapril.com/playbooks): Run a focused QA evaluation on test portability, failure reporting, retention or maintenance. Use independent evidence to judge a vendor or workflow.
- [Developer quickstart](https://cueapril.com/guides/agentic-testing-quickstart): Connect Claude Code or Codex to Cue April, check your project is ready and test an approved GitHub pull request. Match the findings to the exact commit.
- [Risk-based testing](https://cueapril.com/guides/risk-based-testing): Build a risk-based test strategy with an impact and likelihood matrix. Use three worked examples to choose checks and document a release exception.
