Scrum
PSD · Question #168
What is the step to take in TDD after the tests have failed?
The correct answer is D. Write the code to satisfy the test. In TDD you start with writing the test before the code. This test cannot pass. If it does, the test is wrong. When the tests are written, the production code to satisfy the test will be written. Once all the tests succeeds, the product code is done.
Test Driven Development
Question
What is the step to take in TDD after the tests have failed?
Options
- AMeet with the team to see why it fails
- BChange the test in a way that is passes
- CRun it again to verify it fails.
- DWrite the code to satisfy the test
How the community answered
(39 responses)- A8% (3)
- B3% (1)
- C3% (1)
- D87% (34)
Explanation
In TDD you start with writing the test before the code. This test cannot pass. If it does, the test is wrong. When the tests are written, the production code to satisfy the test will be written. Once all the tests succeeds, the product code is done.
Topics
#TDD cycle#red-green-refactor#test first#writing code
Community Discussion
No community discussion yet for this question.