Objective: Write a test case in the full format — ID, requirement, steps, test data, and an expected result calculated from the requirement — so the case can actually fail when the software is wrong.
⏱ ≈2 h full lesson · Practice site: FreshNest booking form · English edition — Español · العربية · বাংলা in translation
🧽 The practice business: FreshNest Home Cleaning — a fictional local cleaning company (owner: Maya Torres) invented for this course. Every example and exercise uses FreshNest, so you learn on a complete, realistic business without ever touching a real one.
Tap a title to open that way of learning. Use as many as you need — then take the lesson quiz below.
A test case is not a vibe ("check the form works"). It is a small contract: given these steps and this data, the requirement promises this exact result. If any of the three is vague, the case cannot fail — and a case that cannot fail cannot catch a bug.
Every case in this course carries the same fields: ID, requirement, preconditions, numbered steps, explicit test data, and an expected result quoted or calculated from the requirement — never from what the software currently does. That last rule is the whole game: if you write the expected result by looking at the screen, you have written a description of the bug, not a test.
Balance the set deliberately. Happy paths prove the product can work; negative and boundary cases prove it refuses to work wrongly. Most real damage hides in the second group: the invalid phone accepted, the empty field waved through, the price computed with the wrong rule.
The course's real test-case document, executed against the FreshNest practice site. Full document: 8 cases (pricing, validation, booking, content).
Deep clean estimate uses the 1.5× multiplier. Requirement REQ-FN-01. Steps: 1) Service = Deep. 2) Bedrooms = 2. 3) Read the estimate. Test data: Deep, 2 beds (Standard base $140).
$210. From the brief's rule, by hand: 140 × 1.5 = 210. Written before the case ever ran.
On the practice build, the screen showed $168. Because the expected result existed independently, the gap is unambiguously a defect — it became defect report DEF-FN-001 (Lesson PQA-06).
TC-FN-PRC-002 (Standard ±$30/bedroom), TC-FN-PRC-003 (Move-Out never shows a price), TC-FN-VAL-001 (letters in phone rejected), TC-FN-VAL-003 (boundary: 9- and 11-digit phones rejected, 10 accepted), TC-FN-BKG-001 (valid booking confirms), TC-FN-CNT-001 (no prohibited claims).
Each case can fail, each failure names a requirement, and the same IDs are reused by the defect reports, the traceability matrix, and the automated suite — one thread from rule to result.
One map of the lesson: a requirement becomes a case, a case becomes a verdict, and the same case proves the fix.
Spot the flaw. Each item is a broken test case fragment — pick what's wrong with it.
1. "Check the Deep price looks right." (no numbers anywhere)
2. Steps: 1) Open the form. 2) Try some phones. Expected: invalid ones fail.
3. Expected result: "The estimate shows what the site currently shows."
4. A case for Move-Out pricing with expected result "$250 flat".
5. Steps and data are exact, but no requirement is named.
Here is the one idea in this lesson. A test case is a contract. You write down the steps, the exact data, and the result the requirement promises, before you run anything. For the FreshNest Deep clean, the rule says one point five times the Standard price. Standard is one hundred forty dollars, so the expected estimate is two hundred ten dollars. When the practice site showed one hundred sixty eight, there was nothing to argue about. The case was right, the site was wrong, and that gap became a defect report. Write the expected result first, from the rule, never from the screen. A case that cannot fail cannot catch a bug.
One check with steps, test data, and an expected result.
Your lead asks you to 'just quickly check the new pricing page' with no cases written. The release is tonight. You…
Explain to a friend, in your own words: why must the expected result be written before you run a test case? Use the $210 vs $168 example.
Now check yourself honestly:
| The weak way | The strong way |
|---|---|
Run it, see $168, assume that's the price. "Check Deep pricing works." | Run it, see $168 — a named, evidenced mismatch. TC-FN-PRC-001 with expected $210 calculated from REQ-FN-01. |
1. Where must the expected result come from?
2. TC-FN-PRC-001 runs and the estimate shows $168. What is true?
3. Which addition most improves "Check invalid phones are handled"?