Developing Applications and Automating Workflows Using Cisco Platforms (DEVASC) — Question 50
What is the first development task in test-driven development?
Answer options
- 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.
Correct answer: B
Explanation
The correct answer is B, as test-driven development starts with writing a failing test case to define the desired functionality before any code is written. Options A, C, and D do not reflect the principles of test-driven development, which emphasizes the creation of tests before the implementation of the code.