Red, Green, Refactor - CI/CD用語集の定義
Red, Green, Refactorは、失敗するテスト、通るコード、そして整理という、TDDの短いループです。
Red, Green, Refactor はテスト駆動開発の中心的なサイクルです。失敗するテストを書き(red)、それを通す最小限のコードを書き(green)、テストを通したままコードを改善します(refactor)。
このサイクルは変更を小さく保ち、常にテストに裏付けられた状態にします。redのステップはテストが失敗しうることを証明し、偶然通るテストを避けます。
実践では
ループを1周するのは数時間ではなく数分です。CIはpushのたびに増え続けるスイートを実行し、greenの状態を誠実に保ちます。
関連ガイド
Test-Driven Development - CI/CD Glossary DefinitionTest-Driven Development: Test-driven development (TDD) is a practice of writing a failing test before writing…
Behavior-Driven Development - CI/CD Glossary DefinitionBehavior-Driven Development: Behavior-driven development (BDD) extends TDD by describing desired behavior in…
Assertion - CI/CD Glossary DefinitionAssertion: An assertion is a statement in a test that checks whether a value or condition matches what is exp…