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.
Write a passing test case for existing code.
D.
Reverse engineer the code for a desired function.
The Answer Is:
B
This question includes an explanation.
Explanation:
Test-driven development (TDD) is a software development process where the developer first writes a test for a new function, then writes the code to pass the test, and finally refactors the code. The steps in TDD are:
Write a Failing Test Case: Before any code is written, a test case is created to define the desired functionality.
Write Code to Pass the Test: The minimal amount of code necessary to pass the test is written.
Refactor: The code is refactored for optimization and improvement while ensuring that the tests still pass.
[Reference: Cisco DevNet Associate Certification Guide, Chapter on Software Development and Test-Driven Development., , , ]
200-901 PDF/Engine
Printable Format
Value of Money
100% Pass Assurance
Verified Answers
Researched by Industry Experts
Based on Real Exams Scenarios
100% Real Questions
Get 65% Discount on All Products,
Use Coupon: "ac4s65"