Facet
DeutschInstall

FOR QA AND ENGINEERING

“All green.” And the customer still calls.

A hundred tests pass, and then two discount codes stack after all. FACET shows you, per feature, which cases a test really checks — and which important case has no test at all.

Redeem a discount code: scenarios and the tests that back them
A valid code lowers the total oncevalid-code-lowers-totalnamed ×2
An expired code is refusedexpired-code-rejectednamed ×1
Two codes don't stackcodes-do-not-stackno test
The discount is capped at 50 %discount-cappednamed ×3

Illustrative example · scenarios and the evidence the record names

WHAT COVERAGE DOESN'T SAY

85% coverage. And nobody knows if the discount rule is tested.

A line can run ten times without any test checking what it is there for. FACET asks a different question: which cases does this feature have to handle — and which of them really has a test?

RECORDcheckout/pricing/discount-codes.yaml
contract:  scenarios:    - id: valid-code-lowers-total    - id: expired-code-rejected    - id: codes-do-not-stack    - id: discount-capped
TESTtest/checkout/discount.spec.ts
// @facet: checkout/pricing/discount-codes// @facet-proves: valid-code-lowers-totalit("applies a valid code once", …)// @facet: checkout/pricing/discount-codes// @facet-proves: expired-code-rejectedit("refuses an expired code", …)// codes-do-not-stack: —

THE NEXT TEST QUESTION

Instead of “we should test more”: the one test that is actually missing.

Your coding agent reads the feature, spots the case without a test and proposes exactly that one. No coverage sprint, no testing week — one missing case per feature.

Which scenario of checkout/pricing/discount-codes has no test yet?

no testcodes-do-not-stack

Given two valid codes, When both are applied, Then only the higher one counts. No test names this scenario. Proposal: one case in discount.spec.ts.

Illustrative example

WHAT FACET DOES NOT DO HERE

An open question is not yet a bug.

A missing test link is an open question, not a proven bug.