nerdexam
Cisco

200-901 · Question #445

What is a concept of test-driven development?

The correct answer is D. Tests that validate the functionality of the code are written before any code is written. Test-Driven Development (TDD) follows a strict Red-Green-Refactor cycle: first write a failing test (red), then write just enough code to pass it (green), then refactor. The defining characteristic is that tests are written before the implementation code exists. Option A…

Software Development and Design

Question

What is a concept of test-driven development?

Options

  • AFunctions that validate the behavior of the product from the end user's perspective are written
  • BBusiness decision makers write tests to validate the product from the end user's perspective while
  • COne developer writes tests to validate the functionality of the code while another developer writes
  • DTests that validate the functionality of the code are written before any code is written.

How the community answered

(43 responses)
  • A
    7% (3)
  • B
    2% (1)
  • C
    2% (1)
  • D
    88% (38)

Explanation

Test-Driven Development (TDD) follows a strict Red-Green-Refactor cycle: first write a failing test (red), then write just enough code to pass it (green), then refactor. The defining characteristic is that tests are written before the implementation code exists. Option A describes behavior-driven or acceptance testing, Option B incorrectly involves business decision makers in writing unit tests, and Option C describes pair programming or code review - none of which are the defining principle of TDD.

Topics

#Test-Driven Development (TDD)#Software Testing#Development Methodologies#Unit Testing

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice