Developing Applications and Automating Workflows Using Cisco Platforms (DEVASC) — Question 275

What is the purpose of running tests before writing code in test-driven development?

Answer options

Correct answer: B

Explanation

The correct answer is B because the fundamental principle of test-driven development is to write tests that initially fail, which confirms that the tests are correctly identifying the intended functionality. Options A and C are incorrect as they do not align with the primary goal of demonstrating test failures for expected reasons. Option D, while related to documentation, does not pertain directly to the testing process in TDD.