nerdexam
Cisco

200-901 · Question #202

In test-driven development, what are two of the green bar patterns? (Choose two.)

The correct answer is C. triangulate E. fake it. In TDD, 'green bar patterns' are strategies used to make a failing (red) test pass quickly. 'Fake It' (E) means returning a hardcoded value to make the test green immediately, then refactoring. 'Triangulate' (C) means writing multiple tests that together force the…

Software Development and Design

Question

In test-driven development, what are two of the green bar patterns? (Choose two.)

Options

  • Aanother test
  • Bbreak
  • Ctriangulate
  • Dstarter test
  • Efake it

How the community answered

(34 responses)
  • A
    6% (2)
  • B
    3% (1)
  • C
    88% (30)
  • D
    3% (1)

Explanation

In TDD, 'green bar patterns' are strategies used to make a failing (red) test pass quickly. 'Fake It' (E) means returning a hardcoded value to make the test green immediately, then refactoring. 'Triangulate' (C) means writing multiple tests that together force the implementation to become general rather than hardcoded. These are two of the three classic green bar patterns (the third being 'Obvious Implementation'). Option A (another test) and D (starter test) are separate TDD concepts for initiating test suites, not green bar patterns. Option B (break) is not a recognized TDD pattern.

Topics

#Test-Driven Development#TDD patterns#Software testing#Development methodologies

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice