nerdexam
Scrum

PSD · Question #107

Why does a test written using TDD always fail?

The correct answer is C. Because the product code to satisfy the test doesn't exist yet. TDD stands for test driven development. It makes developers think before starting to code. This leads to better organized code. It requires the developer to write the code for the test first, the test fails because the code it's testing doesn't exist yet.

Test Driven Development

Question

Why does a test written using TDD always fail?

Options

  • ABecause testers are terrible coders
  • BBecause the tests are checked in before the code exists
  • CBecause the product code to satisfy the test doesn't exist yet
  • DBecause the test needs to be refactored

How the community answered

(55 responses)
  • A
    2% (1)
  • B
    2% (1)
  • C
    93% (51)
  • D
    4% (2)

Explanation

TDD stands for test driven development. It makes developers think before starting to code. This leads to better organized code. It requires the developer to write the code for the test first, the test fails because the code it's testing doesn't exist yet.

Topics

#TDD red-green-refactor#test-first#failing tests

Community Discussion

No community discussion yet for this question.

Full PSD Practice