Actually, I have re-read the question and I agree it is B. Write a failing test case for a DESIRED Function. i.e. the function hasn't been written yet and therefore the code would fail. It makes sense and fits the TDD defintion.
B is correct since writing a failing test is the first task on TDD:
Test-Driven-Development - TDD
Step 1. Write a test: Write a test that tests for the new class or function that you want to add to your code. Think about the class name and structure you will need in order to call the new capability that doesn’t exist yet—and nothing more.
2. Test Fails
3. Write Code
4. Test Passes
5. Refactor
The steps of test first development (TFD) are overviewed in the UML activity diagram of Figure 1. The first step is to quickly add a test, basically just enough code to fail.
I think is D. TDD = Write a test, test fails, write some code, test passes, refactor.
Therefore, you would start by writing a test which you would hope will eventually pass when the correct code has been written.
D is testing 'existing' code which is not necessary.
upvoted 2 times
...
...
This section is not available anymore. Please use the main Exam Page.200-901 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
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.
MrBond_007
Highly Voted 4 years, 5 months ago[Removed]
Highly Voted 10 months, 3 weeks ago[Removed]
Most Recent 8 months, 2 weeks agomacxsz
2 years, 11 months agodesignated
3 years, 3 months agomsamarelli
3 years, 11 months agoMrBond_007
4 years, 5 months agoMellon
3 years, 12 months ago