The mechanics of test-driven development

Red-Green-Refactor may describe the mechanics of TDD, but not its essence.

“TDD is just red-green-refactor,” I heard someone say.

Is it?

Red: write a failing test.
Green: Make the test pass.
Refactor: Remove redundant code, or other structural problems.

That’s not inaccurate. But saying that’s all there is to Test-Driven Development is a bit like saying that all there is to baking a cake is mixing ingredients, and putting them into the oven. Or that all there is to riding a bicycle is pedaling and steering.

Learning the mechanics of a thing is important. But it’s rarely sufficient. It’s the content that matters.

Share this