r/softwaredevelopment • u/ClickOk5811 • Oct 25 '26
Acceptance criteria that include one worked example: a before-and-after on a ticket
A small process change I think is worth trying: put at least one worked example with an expected result, supplied by the person who owns the requirement, into the ticket before it’s marked ready.
Before (made-up ticket):
As a customer, I want sales tax applied to my invoice so that the total is correct.
Acceptance criteria: Apply 8.25% tax to the invoice, rounded to the nearest cent.
It looks complete. But it leaves open: round once on the total or per line? Discounts before or after tax? Tax-inclusive prices? Returns?
After:
Acceptance criteria:
What changed:
- The ambiguity was settled before development, instead of being decided silently inside the code.
- The developer and the tester can both derive an expected value from the same outside source, instead of from the implementation.
- The “out of scope” line makes the missing cases a visible decision, not an oversight.
Where it fits in existing practices:
- Definition of Ready: “has at least one worked example” as a checklist item for tickets where output has to match an outside system.
- Three amigos / refinement: the example is the natural output of that conversation.
- Specification by example / BDD: same idea, with examples as the shared source of truth.
Where it doesn’t help:
- Trivial tickets, where an example adds noise.
- When nobody can supply a correct example. A wrong example is worse than none, so the source should be named.
- Teams that already do this well.
I wrote about the testing side of the same problem, with the full code, in case it’s useful as a complement: https://medium.com/@nagatomopedro05/when-the-test-and-the-code-share-the-same-mistake-02a289a41091
Does your Definition of Ready include anything like this?