volume_mute
TDD Process Cycle
publish date: 2026/06/18 05:45:5.216082 UTC
volume_mutePlease drag and drop the options to sort them
The TDD cycle consists of five steps. Arrange them in the correct order.
Run the test - it should fail since the functionality is not yet implemented
Write an automated test for the new functionality
Identify the functionality increment to be implemented
Refactor code to improve structure and clarity once all tests pass
Implement the functionality and re-run all tests
Correct Answer
(1) Identify the functionality increment to be implemented
(2) Write an automated test for the new functionality
(3) Run the test - it should fail since the functionality is not yet implemented
(4) Implement the functionality and re-run all tests
(5) Refactor code to improve structure and clarity once all tests pass
Explanation
The five-step TDD cycle is: (1) Identify the small functionality increment to implement; (2) Write an automated test for it; (3) Run the test - it must fail initially (confirming the test works and the feature doesn't exist yet); (4) Implement the feature and re-run all tests until they pass; (5) Refactor the code to improve its structure without breaking any tests.
Reference
Software Engineering, Ian Sommerville, 10th edition
