Get your API key

Lesson 2 of 5

From plain-English rules to test cases

Write acceptance criteria as Given / When / Then with real numbers, find the edge cases, and save them in ACCEPTANCE.md.

8 min Log in to open
One step at a time, like flipping pages.

By the end of this lesson you will turn your app's rules into clear test cases with real numbers, find the tricky edge cases, and save them in an ACCEPTANCE.md file that the AI turns into tests.

You need: the 3 rules and 1 journey you wrote down in Lesson 1, your coding agent · Time: 8 minutes

  1. "Late fees should work properly" cannot be tested. Nobody, not you and not the AI, can say if it passed. An acceptance criterion is a rule written so clearly that anyone can check it with a yes or no. It is the "Done when" part of the Prompt Card, made precise.

    Mr Sharma's fee rules, written as checkable rules:

    • The monthly fee is ₹1,500, due on the 10th.
    • Paid on or before the 10th: no late fee.
    • From the 11th: ₹50 for each day late.
    • The late fee never goes above ₹500.
    Why?

    The AI can only test what is written down. Every rule that lives only in your head is a rule the next change can break without anyone noticing.

Log in free to read the rest of this lesson

Every lesson is free. A free account unlocks all of them and saves your progress.

Still to come in this lesson:

  1. Given, When, Then, with real numbers
  2. Find the edge cases
  3. Save them in ACCEPTANCE.md
  4. Check the list yourself
  5. Recap