Scrum
PSD · Question #46
PSD Question #46: Real Exam Question with Answer & Explanation
The correct answer is A. After the tests passes. You should refactor as soon as possible, but before the tests passes it cannot be refactored, because then it is not esatablished just yet. So it would still be part of the first version if changes would be made then.
Question
The right time to refactor code using TDD is
Options
- AAfter the tests passes
- BWhen preparing legacy code for unit tests
- CWhen I can see the debt building in the code
- DAfter the tests fails
Explanation
You should refactor as soon as possible, but before the tests passes it cannot be refactored, because then it is not esatablished just yet. So it would still be part of the first version if changes would be made then.
Community Discussion
No community discussion yet for this question.