1 / 10

Test-Driven Development

Test-Driven Development. Building Better Software Contents What is TDD? Origins. Characteristics. Life Cycle. Benefits. What can be tested? Framework. References. Code Example. What is Test Driven Development?.

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 Building Better Software Contents • What is TDD? • Origins. • Characteristics. • Life Cycle. • Benefits. • What can be tested? • Framework. • References. • Code Example.

  2. What is Test Driven Development? An iterative technique to develop software. Test-driven development (TDD) is an advanced technique of using automated unit tests to drive the design of software and force decoupling of dependencies.

  3. Origin Test-Driven Development is a core part of the agile process formalized by Kent Beck called eXtreme Programming (XP). XP originally had the rule to test everything that could possibly break. Now, however, the practice of testing in XP has evolved into Test-Driven Development." Do not need to adopt XP in order to practice TDD and gain the benefit from it.

  4. Characteristics Maintain an exhaustive suite of Programmer Tests. No code goes into production unless it has associated tests. write the tests first. Tests determine what code you need to write.

  5. Life Cycle Write Test Compile Refactor As Needed Run & See the Fail

  6. TDD Benefits Better Code No defects. Meet requirement. Remove Duplication. Less Debug Time. Tests become an asset. Tests are documentation. De-couple.

  7. What Can be Tested? Valid Input In-valid Input Exceptions Boundary Conditions Everything that should be possible break.

  8. Testing Framewrok Test Must be Automated. A Simple Tool collect, organizes and automatically call test code. Most OO Language has testing framework. Nunit for .Net, Junit for Java, JSUnit for Javascript, VBUnit for Visual Basic, CppUnit for C++. Graphical Test Runner. Could be added to build Environment.

  9. References http://msdn.microsoft.com/en-us/library/aa730844(VS.80).aspx TestDrivenDevelopmentByExample By Kenth Beck Test Driven Development-A practical Guide By David Astels Test-Driven Development in Microsoft .NET by James W. Newkirk and Alexei A. Vorontsov http://blog.daveastels.com/files/BDD_Intro.pdf

  10. See Demo Project Thanks. Habib MMODC

More Related