1.

Explain TDD (Test-Driven Development).

Answer»

SOFTWARE developers can use testing-driven DEVELOPMENT (TDD) in the development of software. In TDD, developers plan the features of the software that they want to create and then write test cases for each feature before implementing it. Through test-driven development, we can gain insight into both the quality of the implementation (does it work) and the quality of the design (is it well structured). 

At first, the test case will fail because the code is not yet implemented, and this is usually referred to as the red phase. After that, code is written to ensure that the test case passes and does not break any components or current test cases, which is CALLED the GREEN phase. The developer should then refactor the implementation of the code by cleaning and maintaining the CODEBASE, as well as optimizing the efficiency. This process should then be repeated every time a new test case is added. 



Discussion

No Comment Found