Red, Green, Refactor

noun

say it: “RED GREEN ree-FAK-ter” /rɛd ɡriːn riːˈfæktər/

The test-driven development cycle: write a failing test (red), make it pass (green), then tidy the code.

What is Red, Green, Refactor?

Red, green, refactor is the TDD loop: write a failing test (red), make it pass (green), then clean up the code with tests still passing.

In a sentence

  • “We work in red, green, refactor: the test fails first, then passes, then we clean up.”

Level: Journeyman · More Unit Testing terms at this level

Updated