Activity 01
Pairs: TDD Implementation
Pairs select a simple function requirement, like calculating prime numbers. They write a failing unit test first, code the minimum to pass, refactor, and repeat for three features. Debrief on how tests shaped their design.
How does Test-Driven Development change the way a programmer approaches a new problem?
Facilitation TipDuring TDD Implementation, circulate and ask pairs to explain their test-first reasoning aloud so hesitant students hear the logic repeated.
What to look forProvide students with a simple, buggy function. Ask them to write one unit test that would fail due to the bug and then describe the debugging step they would take to find the error.