PSD practice question 25 of 25

While practicing Test-Driven Development, what is done after the test fails? (choose the best answer)

Full set: 163 questions
Answer options
A: Meet with the business analyst to ensure that the test is correct.
B: Write the minimum amount of product code to satisfy the test. Correct answer
C: Run it again to make sure it really fails.
D: Implement the required functionality.
E: Refactor the test so the code passes.
Correct Answer:
B. Write the minimum amount of product code to satisfy the test.
Explanation

Test-Driven Development (TDD) involves writing a failing test first, then writing the minimal code needed to make the test pass. This iterative process ensures code correctness and encourages better design.

Scroll to Top