📞 0339-0387701 (WhatsApp) Contact

« Back to Software Engineering (NCCIA)

In TDD, the refactor step is done for what purpose?

A. To delete all tests
B. To improve the code's structure without changing its behaviour ✅
C. To add new features
D. To deploy the system

Correct Answer: B. To improve the code's structure without changing its behaviour

Explanation

Refactoring after green keeps the code clean while the passing tests guard against behaviour change.