1 / 3

Test-Driven Development

Test-Driven Development. Three Rules . Don’t write any production code until you have written a failing unit test. Don’t write more of a unit test than is sufficient to fail or fail to compile Don’t write any more production code than is sufficient to pass the failing test. Advantages.

vidal
Télécharger la présentation

Test-Driven Development

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Test-Driven Development

  2. Three Rules • Don’t write any production code until you have written a failing unit test. • Don’t write more of a unit test than is sufficient to fail or fail to compile • Don’t write any more production code than is sufficient to pass the failing test.

  3. Advantages • All program functions are testable and have tests that verify their operation. • We can tell when we break something. • We see the function from the caller’s point of view. • The function will be “conveniently callable.” • Because the function is callable, we have decoupled it from other system software – e.g., the user interface. • Test provides documentation in the form of a working example.

More Related