1 / 19

Test Driven Development

Test Driven Development. By: Taylor Helsper. Outline. Introduction Test Driven Development JUnit TDD Example Conclusion. Introduction. What is this lecture? Part of a CSE 4000 Independent Study Course “Practical Issues in Software Engineering” What’s the point?

esben
Download Presentation

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 By: Taylor Helsper

  2. Outline • Introduction • Test Driven Development • JUnit • TDD Example • Conclusion

  3. Introduction • What is this lecture? • Part of a CSE 4000 Independent Study Course • “Practical Issues in Software Engineering” • What’s the point? • To provide practical information to students in Software Engineering topics Note: The products discussed in this presentation are examples used for teaching purposes and are not endorsements of the products.

  4. Outline • Introduction • Test Driven Development • JUnit • TDD Example • Conclusion

  5. Test Driven Development • What is it? • Development/Testing process where tests are generated before the development • Development is completed based on the tests

  6. Test Driven Development • Why is it useful? • Distinct Steps • Good Metrics • Ensures Completion Based on Requirements/Design

  7. Test Driven Development • Why is it useful? • Only necessary features are implemented • Short Development Lifecycle • Easy to Accommodate Changes

  8. Test Driven Development • Steps • Write tests based on design / requirements • Write code • Run tests • Repeat until all tests pass

  9. Test Driven Development http://en.wikipedia.org/wiki/Test-driven_development

  10. Outline • Introduction • Test Driven Development • JUnit • TDD Example • Conclusion

  11. JUnit • What is it? • JUnit is a testing framework for Java • It allows programmers to write test cases for Java classes

  12. JUnit • Why use it? • Repeatability • Metrics / Measurement • Easy Integration

  13. JUnit Examples • A JUnit Test Case

  14. JUnit Examples • JUnit Before/ After

  15. Outline • Introduction • Test Driven Development • JUnit • TDD Example • Conclusion

  16. TDD Example • Math Class for a Calculator Program • Steps • Generate Tests • Code • Run Tests • Repeat

  17. Conclusion • Test Driven Development is important to understand • TDD is useful in many circumstances • TDD • Saves Money • Is Agile • Offers Good Metrics

  18. References • Junit - http://www.junit.org/ • Netbeans – http://netbeans.org/ • JUnit Examples - http://junit.sourceforge.net/doc/cookbook/cookbook.htm • MSU Classes and work experience

  19. Questions?

More Related