nerdexam
Cisco

200-901 · Question #113

Which two concepts describe test-driven development? (Choose two.)

The correct answer is A. It enables code refactoring. B. Write a test before writing code.. Test-driven development (TDD) follows a strict cycle: (1) Write a failing test for a desired function before any implementation code exists, (2) Write the minimum code needed to make the test pass, then (3) Refactor/clean up the code while keeping tests green. Choice B directly d

Software Development and Design

Question

Which two concepts describe test-driven development? (Choose two.)

Options

  • AIt enables code refactoring.
  • BWrite a test before writing code.
  • CImplementation is driven by incremental testing of release candidates.
  • DUser acceptance testers development the test requirements.
  • ETests are created when code is ready for release.

How the community answered

(39 responses)
  • A
    92% (36)
  • C
    5% (2)
  • D
    3% (1)

Explanation

Test-driven development (TDD) follows a strict cycle: (1) Write a failing test for a desired function before any implementation code exists, (2) Write the minimum code needed to make the test pass, then (3) Refactor/clean up the code while keeping tests green. Choice B directly describes the foundational TDD principle of writing tests first. Choice A is correct because the safety net of automated tests is precisely what makes confident code refactoring possible - you can restructure code knowing the tests will catch regressions. Choice C is wrong because TDD is not about testing release candidates; it drives design incrementally from the start. Choice D is wrong because TDD tests are written by developers, not UAT testers. Choice E is the opposite of TDD - writing tests only when code is ready for release is traditional testing, not TDD.

Topics

#Test-Driven Development (TDD)#Software testing#Refactoring#Development methodologies

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice