🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A.Write a test for the new feature and watch it fail
  2. B.Write all the code, then add tests
  3. C.Refactor the existing code
  4. 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 →