TOPIC 09/3712 MINNOT STARTED

Test-driven development for testers

In test-driven development a developer writes a failing test first, then the code to pass it. Testers read the tests as a plain list of promises.

L1–L4 are part of the Pro pass

L0 Explain simply

Analogy: drawing the finish line before running the race. A runner who draws the finish line first knows when the race is over. Without a line, the runner may stop too soon or run on for no reason.

Daily List is a to-do list app. Leo must build a reminder that is sent one hour before a task is due. He does not start with the code. He first writes a test that says, "A task due at five gets a reminder at four." The test fails, because no code exists yet.

Now Leo has a finish line. He writes just enough code to make the test pass. Then he tidies the code and runs the test again. This way of working is .

Tom, the tester, likes it. The tests read like a list of promises. He can see what the reminder is meant to do before he opens the app.

The picture has a limit. A race has one line, but a feature has many. Also, a finish line cannot tell you if the track was a good one.

(SYNTHETIC / TRAINING ONLY: Daily List and every person named in this lesson are invented.)

PICTURE IT

The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.

THE REAL JOB Writing the finish line first, then running to it, then tidying the path.

  1. Draw the line
  2. Run to it
  3. Tidy the path
  4. Draw the next line
Finish line first

HOW THE PICTURE MAPS

How each part of the picture matches the software
In the pictureIn the software
Drawing the finish lineWriting a failing test first
Running to the lineWriting the simplest code that passes
Tidying the pathRefactoring while the tests stay green
A race with many lapsThe loop of small tests

WHERE THIS PICTURE STOPS

  • A race has one line. A feature has many.
  • A finish line cannot tell you if the track was good.
  • Runners tidy the track after the race. Developers tidy during the loop.

HOOK

Red, green, tidy.

REMEMBER IT THIS WAY

A story beat: one picture-line that carries the order or the cause.

Leo writes a test saying a task due at five gets a reminder at four. It fails because no code exists yet, and that failure is his finish line.

What each part of the trick stands for
In the trickWhat it stands for
Failing testNo code exists yet
Just enough codeMakes the test pass
Tom's viewTests read like a list of promises

A finish line cannot say if the track was good, so a passing test does not prove the feature is good.

TELL A FRIEND

Draw the finish line, run to it, then tidy the path. Repeat with the next line.

OFTEN MIXED UP WITH Unit tests for testers. The unit tests lesson shows what a unit test is. This lesson shows writing it first.

PRACTISE AND KEEP

Sources for this topic — 5 sources
  1. Market practice

    ISTQB Certified Tester Foundation Level Syllabus v4.0.1 ↗ — International Software Testing Qualifications Board · Section 2.1.3, test-first approaches: test-driven development, acceptance test-driven development and behaviour-driven development write tests before the code (confirmed against the syllabus, read in full text from a mirror copy of the publisher PDF, v4.0.1, 15 September 2024)

    The examinable statement of what a foundation-level tester is expected to know: six chapters, 64 learning objectives, each tagged K1 Remember, K2 Understand or K3 Apply, plus the test-design techniques the qualification names and groups as black-box, white-box and experience-based.

    Used here for the test-craft questions a Payment Quality Assurance Analyst and a Production Support Analyst are asked. It is cited for what the syllabus says a tester must be able to do, never as a rule about how payments work. · Checked 2026-11-07

    v4.0.1 is dated 15 September 2024 and is a list of corrections to v4.0 (21 April 2023) that reworded six learning objectives — not a cosmetic reissue. 78 pages.

    Two traps this entry exists to stop. v4.0.2 is the German edition (1 March 2025, 94 pages), so sorting by version number reaches the wrong document. And the widely-repeated per-chapter question allocation "8 / 5 / 4 / 11 / 9 / 3" is wrong: it is 8 / 6 / 4 / 11 / 9 / 2, derived from three official sample-exam answer keys and confirmed against the Exam Structure Tables.

    The single most consequential detail for a question bank: white-box coverage — statement and branch — is K2 "Explain", not K3 "Apply" (FL-4.3.1, FL-4.3.2, FL-4.3.3), and MC/DC, path and condition coverage are declared out of scope in §4.3. A question asking a candidate to compute branch coverage is testing something this syllabus does not.

    Read through a mirror, because the publisher's own domain could not be fetched (a reachability gap, not a statement about the publisher). A 403 there is a policy refusal and says nothing about whether the document exists or is reachable elsewhere.

    Anyone on an unrestricted network should open the canonical URL above and confirm the section and page numbers cited against it. Every claim drawn from this entry is written so that it can be checked against a numbered page.

    Read from two independent PDF-to-markdown conversions mirrored on raw.githubusercontent.com. They are treated as faithful because they were produced by unrelated parties with different tooling, agree on the full 64-item objective set including wording, and reproduce the same internal inconsistency present in the source PDF. Chapter 1 reads "testware that supports" where Appendix B reads "that support". A conversion artefact does not replicate across two toolchains.

    The licence permits attributed non-commercial extracts and use as the basis for articles. Whether a site that sells a pass may rely on that is an owner's decision, not this entry's.

    7 November 2026 review: actual publisher PDF 4.0.1, 15 September 2024, 78 pages, front matter/copyright and relevant numbered operative sections 0.5–0.10 and chapters 1–6 compared with CTFLpractice lessons. Earlier mirror/search descriptions are historical access records. TheK2 white-box objectives require explanation; the source does not justify a categorical ban on small numeric illustrations that support explanation. Later Exam Rules 1.2§4.1.4 usesK2 for keyword definitions, while syllabus§0.5 usesK1; keep dated scopes distinct. No copied questions or figure assets.

  2. Market practice

    Review: Test-driven Development by Example (ACCU book reviews) ↗ — ACCU · Kent Beck's book sets out a rhythm of a failing test, making it pass quickly, then removing duplication (search excerpt, page not opened)

    Reviews Kent Beck's book, which sets out the red, green, refactor rhythm. Practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  3. Market practice

    Test Double (Martin Fowler bliki) ↗ — Martin Fowler · Test doubles stand in for real parts so a test can check one piece alone (search excerpt, page not opened)

    Defines test double and the dummy, fake, stub, spy and mock kinds. Practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  4. Market practice

    The Practical Test Pyramid (Martin Fowler site, by Ham Vocke) ↗ — Martin Fowler / Ham Vocke · Unit tests sit at the base of the pyramid and are fast (search excerpt, page not opened)

    Explains the test pyramid, sorting tests by size, and the ice-cream cone warning. Practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  5. Market practice

    PIT basic concepts — mutation outcomes ↗ — PIT · Equivalent mutations and outcomes, opened 6 November 2026; distinguish surviving behaviour-changing from equivalent mutants.

    Current basic concepts and Equivalent mutations: a surviving equivalent mutant may not change observable behaviour; survival alone does not prove weak assertions. · Checked 2026-11-06

    Publisher primary source opened and relevant sections read on 6 November 2026 for the Agile/DevOps domain analysis. Original explanations are used; no extensive source text is copied.

Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.