redgreenrefactor
Red-green-refactor is a software development practice used to guide design and implementation through test-driven development. It describes a short, repeatable cycle with three steps: red, green, and refactor. In the red step, a new test is written for a desired function or behavior and the test fails. In the green step, the minimum amount of code is written to make the test pass. In the refactor step, the code is cleaned up to improve structure and maintainability without changing its external behavior. The cycle is repeated as new functionality is added.
Origin and context: The technique is closely associated with Kent Beck and the broader practice of test-driven
Practice and purpose: The red-green-refactor cycle encourages writing tests before code, ensuring that each new feature
Variations and considerations: Some teams frame the cycle as red, green, refactor, repeat, or adapt it within