← Quiz: Testing Python Code: all 10 questions
Quiz: Testing Python Code · Question 9 of 10
In TDD, what is the first step of the cycle?
In TDD, what is the first step of the cycle?
- A.Write a test for the new feature and watch it fail
- B.Write all the code, then add tests
- C.Refactor the existing code
- D.Deploy the feature
Answer & explanation
Correct answer: Write a test for the new feature and watch it fail
Red (failing test), then green (make it pass), then refactor.
Can you get the rest right without peeking?
Take the timed Quiz: Testing Python Code quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →