Third, he requires that all units of code include both internal test code and external testing procedures before they are considered complete. It is critical that coding be completed within the construction phase, rather than allowing it to spill over into the testing process. Doing a substantial amount of coding in response to bug reports is a schedule killer because it is unplanned and unmanageable. Requiring that code deliveries include test harnesses extends the time necessary to produce a unit of code, but it's the only realistic way to plan and control the amount of time allocated for each unit on the project plan. Test to Clarify Specifying test cases as part of module design clarifies the intent of the class or module and maps it back to requirements.
Test cases flow naturally from use cases and supporting scenarios.
Delivering test cases with the code that they test increases the confidence that the code supports the use cases. If developers write the test code before writing the class code, the test code will document what the class code will have to do and will provide another opportunity to clarify any confusion about requirements. Because the test code focuses mainly on the external interface of the class, it will highlight required public methods and internal calculations. Delivering code without internal and external test facilities simply defers the creation of unit tests to the test process, which is ill equipped to plan or manage this work. Furthermore, it practically guarantees unplanned reworking, because in the absence of verification it is virtually certain that either a programmer or a tester will fail to fulfill or understand a requirement.