BDD & TDD / Quiz

Red, Green, Refactor

The TDD loop, why the red step is not optional, and what a test that never failed is actually worth.

Difficulty
Easy
Format
Quiz
Points
100
Estimate
10 min

// MISSION BRIEF

Your Mission

TDD is a discipline, not a vibe. This quiz checks the mechanics of the red-green-refactor cycle: what each phase is for, what "minimal code" means, and the warning signs that the loop is being faked.

Scoring: timed quiz; accuracy first, speed bonus for fast clean runs.

// FIRST CONTACT

Battle teaser

The TDD cycle, in order:

  1. AWrite all tests for the feature, then implement everything
  2. BWrite a failing test, write the minimum code to pass, refactor with tests green
  3. CWrite the code, write tests to cover it, refactor
  4. DRefactor, write tests, write code
Answers, scoring, hints, and the full battle stay sealed.

// SKILL TAGS

tddred-green-refactorunit-testingtest-design