The most detailed free FDE + DevOps library: 140+ lessons, 70+ labs and 80 long-form articles, in English and Turkish. Start learning →

Build with AI: From Zero to Your First App · Module 7: Debugging and testing · Lab

Test Routine Plus Loop Drill

40 min hands-on · Core

Browser only. Run the full routine on a provided fix with a planted regression; then drill two dead hypotheses with verdicts.

Three ways to do this lab. A: the browser steps below, the main path, free with no account. B: try the same task with your own AI tool if you have one (its terms and quotas apply). C: work from the provided material and the worked solution below, which teaches the same skill. No path claims you used a live AI tool when you did not.

Objectives

  • Write the test list before the fix with normal, edge, invalid and old-feature lines
  • Catch the planted regression through the routine
  • Write two dead hypotheses with single tests and verdicts for a stuck fault
  1. Step 1

    Write the list

    Fix under test: storage quota check plus message. List: normal submit persists; edge exactly-50 accepted; invalid empty guarded; old features echo, validation, 360px layout, delete. The layout line hides a planted overflow from message styling.

    fix-under-test.mdmarkdown
    FIX UNDER TEST (synthetic practice material)
    ---
    Change: quota check before save plus a message line styled wide.
    Planted regression: message styling overflows at 360px (fixed-width rule).
    Routine must catch it via the old-feature layout line.
  2. Step 2

    Run the routine

    Run every line, record pass or fail. The layout line fails: message overflows at 360px. Fix the width rule singly, re-run the full list to green.

  3. Step 3

    Drill the loop exit

    For a stuck echo-shows-stale fault, write hypothesis one (reads before save) with single test and killed verdict, hypothesis two (renders cached list) with test and confirmed verdict. Note the loop signals that triggered the method.

How to confirm it worked

  • Test list written before the fix with all four classes
  • Planted regression caught via the layout line, fixed singly, list re-run green
  • Two hypotheses with single tests and verdicts written
  • Loop signals noted with the exit decision

Workspace

0/2 checks passing · Coverage only, not a quality score.

Draft kept in this browser.

Hints, in three stages

Stage 1: a nudge

The routine is unconditional. Skipping the layout line 'because the change was storage' misses the planted bug by design.

Stage 2: a direction

Fix the regression with one width rule, then re-run everything. Single fix plus full re-run is the law.

Stage 3: almost the answer

Hypotheses must be single sentences with single tests. Stacked hypotheses restart the loop.

Worked solution (open after an honest attempt)

Worked solution. List run: normal pass, edge pass, invalid pass, echo pass, validation pass, layout FAIL (message overflows at 360px), delete pass. Single fix: message width rule fluid. Re-run: all green. Loop drill: H1 reads-before-save, test reorder, killed; H2 cached-list render, test fresh read, confirmed fix. Signals noted: same fault twice plus vaguer requests. Method exited the loop; a third identical plea would have rewritten the form.