← Quiz: Unit Testing and TDD: all 10 questions
Quiz: Unit Testing and TDD · Question 3 of 10
In TDD, what must happen in the "red" step?
In TDD, what must happen in the "red" step?
- A.A new test is written and it fails, because the feature does not exist yet
- B.The code is refactored
- C.All tests are deleted and rewritten
- D.The code is deployed to production
Answer & explanation
Correct answer: A new test is written and it fails, because the feature does not exist yet
A failing test proves the test can detect the missing behaviour.
Can you get the rest right without peeking?
Take the timed Quiz: Unit Testing and TDD quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →