Test-driven development follows a three-phase process:

Red

We write a failing test (including possible compilation failures). We run the test suite to verify the failing tests.

Green.

We write just enough production code to make the test green. We run the test suite to verify this.

Refactor

We remove any code smells. These may be due to duplication, hardcoded values, or improper use of language idioms. If we break any tests during refactoring, we prioritize getting them back to green before exiting this phase.

Attachments: