Upload
brody-harris
View
50
Download
0
Embed Size (px)
DESCRIPTION
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?. - PowerPoint PPT Presentation
Citation preview
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?
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.
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.
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.
Life Cycle
Write Test
Compile
Run & See the Fail
Refactor As Needed
TDD Benefits
Better Code No defects. Meet requirement. Remove Duplication. Less Debug Time. Tests become an asset. Tests are documentation. De-couple.
What Can be Tested?
Valid Input
In-valid Input
Exceptions
Boundary Conditions
Everything that should be possible break.
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.
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
See Demo Project
Thanks.
Habib MMODC