Developing Applications and Automating Workflows Using Cisco Platforms (DEVASC) — Question 496
What is a principle of test-driven development?
Answer options
- A. write and run tests before writing new code
- B. write tests after adding new blocks of code
- C. run tests after writing new code
- D. write documentation for tests
Correct answer: A
Explanation
The correct answer, A, emphasizes that in test-driven development, tests are created and executed before any new code is written, ensuring that the code is built to pass the tests. Options B and C suggest a reactive approach to testing, which contradicts the proactive nature of test-driven development. Option D, while important, does not address the fundamental principle of writing tests first.