By Poonam Bhasin 07030244011

• • • • • •

What is Testing What is Test Driven Development Things to Test Advantages of TDD Testing via xUnit Framework 2 Simple rules for TDD




Desig n



Impleme nt

 Valid

Inputs  Invalid Inputs  Errors, exceptions, and events  Boundary conditions  Everything that could possibly break!

Much les s de bug tim e : Programmers using pure TDD on new projects report they only rarely feel the need to invoke a debugger. Eliminating defects early in the process usually avoids lengthy and tedious debugging later in the project. He lps build Sof twa re bett er and f aster Force s t he p rog ra mmer to f ocus m ore on the i nterf ace than on imp le ment ation : By focusing on the test cases first, one must imagine how the functionality will be used by clients Lim it t he nu mbe r o f de fects in t he co de : The early and frequent nature of the tests helps to catch defects early in the development cycle, preventing them from becoming endemic and expensive problems TD D le ads to m ore mod ula rize d, f le xible , a nd ext ensible code : Since the methodology requires that the developers think of the software in terms of small units that can be written and tested independently and integrated together later. This leads to smaller, more focused classes, looser coupling, and cleaner interfaces.
Does not only offer simple validation of correctness Also drives the design of the program

 Write

new business code only when an automated test has failed  Eliminate any duplication that you find To Implement the rules
• design organically, with the running code

providing feedback between decisions • write your own tests • development environment must provide rapid response to small changes • designs must consist of highly cohesive, loosely coupled components (e.g. your design is highly normalized) to make testing easier



Sign up to vote on this title
UsefulNot useful