O ciclo do TDD - Test Driven Development, ou, em português, Desenvolvimento Guiado por Testes consiste em:
implementar teste unitário falho, tornar o teste bem-sucedido e refatorar.
implementar a funcionalidade, executar teste unitário e refatorar.
implementar teste unitário falho, refatorar e tornar o teste bem-sucedido.
implementar a funcionalidade, refatorar e tornar o teste bem-sucedido.
refatorar, executar teste unitário e implementar a funcionalidade.