There is nothing about this question in official book nor in devnet site.
So I researched 10 specialized sites. "increased code quality" is a benefit in all of them.
I would say the correct answer is A because of this section in official cert guide book:
"
TDD may see like a waste of time initially. Why write tests for stuff you know isn’t going to
pass? Isn’t all of this testing just wasted effort? The benefit of this style of development is
that it starts with the end goal in mind, by defining success right away. The test you create is laser focused on the application’s purpose and a clear outcome. Many programmers add too much to their code by trying to anticipate future needs or building in too much complexity for an otherwise simple problem. TDD works extremely well with the iterative nature of Agile development, with the side benefit of having plenty of test cases to show that the software works.
"
I think this should be A. Writing tests first forces you to think about what the code is actually supposed to do and avoid superfluous things.
While testing -can- lead to quality code, it doesn't automatically lead to that. It only ensures that the code works. You could write terribly inefficient or sloppy code that still passes tests, so I don't think D is correct.
A key benefit of test-driven development is that it makes the developer focus on requirements before writing code. This is in contrast with the usual practice, where unit tests are only written after code. This shows that new code is actually needed for the desired feature.
D is correct.
1. Better program design and higher code quality
2. Detailed project documentation
3. TDD reduces the time required for project development
4. Code flexibility and easier maintenance
5. With TDD you will get a reliable solution
6. Save project costs in the long run
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
anonymous1966
Highly Voted 2 years, 7 months agoBlippen
Most Recent 1 week agoGrace2024
6 months, 1 week agoHolko18
1 year, 7 months agonunyabeez
1 year, 10 months agonospampls
2 years agomellohello
2 years agoToTheBone
2 years, 2 months agomacxsz
2 years, 6 months agosds85
2 years, 9 months agodesignated
2 years, 10 months agoFrank338
2 years, 10 months agoFrank338
2 years, 10 months ago