1 / 10

Test Driven Development

Test Driven Development. Presented by: Ryan Rapp. Overview. What is TDD? Refactoring Advantages Disadvantages Why should I use TDD? Conclusions. What is TDD?. Don’t write production code without first writing a failing unit test Don’t write more of a test than is sufficient to fail

henry-roman
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 Presented by: Ryan Rapp

  2. Overview What is TDD? Refactoring Advantages Disadvantages Why should I use TDD? Conclusions

  3. What is TDD? Don’t write production code without first writing a failing unit test Don’t write more of a test than is sufficient to fail Don’t write more code than is sufficient to pass the test

  4. What is a Unit Test? Tests a very small section of code in isolation Runs every time you compile your code Easy to read and understand Runs very quickly May use mock objects to avoid testing complex interactions

  5. Refactoring Take existing code and change it so that it is more efficient Don’t actually change the output of the code, just how it works May incorporate significant changes

  6. Advantages Produces fully testable code Gets running code very quickly Design to the specifications, don’t over-engineer

  7. Disadvantages Causes people to take paths they wouldn’t otherwise “Write test, write code to pass test, repeat” loop is overly strict Most TDD shops don’t strictly adhere to it

  8. Why should I use TDD? TDD makes you produce 100% testable code You won’t spend a long time with non-running code Your code will always meet the design specifications

  9. Conclusion TDD isn’t for everyone TDD is a very good design principle TDD produces 100% tested/testable code End up with better software

  10. Questions?

More Related