exam questions

Exam 200-901 All Questions

View all questions & answers for the 200-901 exam

Exam 200-901 topic 1 question 3 discussion

Actual exam question from Cisco's 200-901
Question #: 3
Topic #: 1
[All 200-901 Questions]

What is the first development task in test-driven development?

  • A. Write code that implements a desired function.
  • B. Write a failing test case for a desired function.
  • C. Reverse engineer the code for a desired function.
  • D. Write a passing test case for existing code.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
MrBond_007
Highly Voted 4 years, 5 months ago
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.
upvoted 29 times
...
[Removed]
Highly Voted 10 months, 3 weeks ago
Selected Answer: B
"B" rite answer
upvoted 10 times
...
[Removed]
Most Recent 8 months, 2 weeks ago
Selected Answer: B
The correct answer is B.
upvoted 1 times
...
macxsz
2 years, 11 months ago
Selected Answer: B
B should be
upvoted 1 times
...
designated
3 years, 3 months ago
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
upvoted 5 times
...
msamarelli
3 years, 11 months ago
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.
upvoted 1 times
...
MrBond_007
4 years, 5 months ago
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.
upvoted 1 times
Mellon
3 years, 12 months ago
D is testing 'existing' code which is not necessary.
upvoted 2 times
...
...
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.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago