Developing Applications and Automating Workflows Using Cisco Platforms (DEVASC) — Question 400
What is a concept of test-driven development?
Answer options
- A. Functions that validate the behavior of the product from the end user’s perspective are written before any code is written.
- B. Business decision makers write tests to validate the product from the end user’s perspective while the developer writes the code.
- C. One developer writes tests to validate the functionality of the code while another developer writes the code.
- D. Tests that validate the functionality of the code are written before any code is written.
Correct answer: D
Explanation
The correct answer, D, accurately describes test-driven development (TDD), which requires writing tests before the actual code is developed. Options A and B misrepresent TDD by suggesting that tests are focused on end-user perspectives or involve business decision makers, which is not the primary focus of TDD. Option C implies a separation of roles that is not essential to the TDD process.