Writing tests is one of the jobs people most happily hand to a coding agent. You ask for tests for a module, and a few minutes later coverage is noticeably higher than before. That's real help. Coverage just doesn't tell you whether those tests check what your product actually promises.
A small example: an online shop has one test for refunds. It takes an order delivered five days ago and expects the refund to go through. canRefund has two lines of logic, the test runs both, and the coverage tool reports 100%. Still, nobody checks that a return on day 31 is refused. If someone set the window to 14 days, the test would stay green.
Why coverage doesn't tell you everything
Coverage measures which lines a test runs, not which cases it checks. For a time window, the interesting cases are the edges: day 30 and day 31. The day-5 test runs through the same lines and says nothing about either.
AI-written tests add a twist. An agent writing tests for existing code derives them from that very code, so it FACET recordA FACET record is a short, checkable description of one feature, kept as a YAML file next to the code. It states why the feature exists, the behaviour it promises as scenarios, and the tests that check it.In the glossary what the code does, including where the code is wrong. Konstantinou, Degiovanni and Papadakis observed the same with AI test generators. A study at ISSTA 2026 concludes that for such tests, coverage and mutation scores no longer reliably show whether they find a bug that is already there.
Google's DORA 2025 report draws a practical lesson from this: more AI only stops making delivery less stable when good automated tests back it up.
What FACET counts instead
FACET keeps a short description of each feature of your product in the repository, which it calls a record. It lists the cases the product promises, as ScenarioA scenario is one behaviour a feature promises, written in a record as Given/When/Then steps. Each scenario has an id that tests and other records can refer to.Read more here, and the tests that prove them. Refunds have two scenarios, but only one has a test:
contract: scenarios: - id: refund-within-window statement: | Given an order delivered 29 days ago When the customer requests a refund Then the refund is accepted - id: refund-after-window statement: | Given an order delivered 31 days ago When the customer requests a refund Then the shop refuses itverification: unit_tests: - id: tests/refund.test.ts proves: [refund-within-window]
facet test runs your tests and assigns the results to features:
npx facet-framework test
runner vitest: exit 0passed orders/refunds/request-refundFeatures: 1 passed, 0 failed, 0 unmeasured (1 total)
That's correct: the test the record names passes. facet lint shows you the gap:
npx facet-framework lint
warning: docs/facets/features/orders/refunds/request-refund.yaml: contract scenario(s) with no verification proof: refund-after-windowNow you can see what coverage doesn't tell you: refusing a return after 31 days has no test. And when you ask an agent to write tests, it gets the scenarios as a starting point instead of guessing the cases from the code. By the way, a feature with no test at all shows up in facet test as unmeasured, never as passed. With --fail-unmeasured, that fails the build if you want it to.
To run your tests through FACET, follow Find business rules no test checks. To show your team where things stand in the browser, see Show which features are tested, in five minutes with FACET Atlas.
What FACET doesn't check
FACET checks that a test claims a scenario, not what the test actually asserts. If you add refund-after-window under proves without changing the test, the warning goes away and the gap stays. So read the test before you list it.
Green in FACET means every written-down scenario has a passing test. A case nobody wrote down is missing here too. Whether the scenarios are complete is something you settle when reviewing the record.
And facet test needs a test runner that writes a JUnit report with file names, such as Vitest, Jest or PHPUnit. Without file names, FACET can't assign results to a feature.