November 16, 2010 NWO-PUG 1
Intro to Test Driven DevelopmentIntro to Test Driven Development
Chris TankersleyChris Tankers...
November 16, 2010 NWO-PUG 2
Who Are You and Why Are You InWho Are You and Why Are You In
My House?My House?
Chris Tankersl...
November 16, 2010 NWO-PUG 3
What is Test Driven Development?What is Test Driven Development?
„„Test-driven development (TD...
November 16, 2010 NWO-PUG 4
Why Do TDD?Why Do TDD?
●
Considered a Best Practice amongst almost allConsidered a Best Practi...
November 16, 2010 NWO-PUG 5
TDD is EasyTDD is Easy
1)1)Write a TestWrite a Test
2)2)Watch it FailWatch it Fail
3)3)Write C...
November 16, 2010 NWO-PUG 6
Our Sample ApplicationOur Sample Application
●
Create an application to test basic math skills...
November 16, 2010 NWO-PUG 7
[CODE][CODE]
November 16, 2010 NWO-PUG 8
LinksLinks
●
PhpUnitPhpUnit
●
http://www.phpunit.de/http://www.phpunit.de/
November 16, 2010 NWO-PUG 9
Thanks toThanks to
●
Jeremy KendallJeremy Kendall
●
http://www.jeremykendall.net/http://www.je...
November 16, 2010 NWO-PUG 9
Thanks toThanks to
●
Jeremy KendallJeremy Kendall
●
http://www.jeremykendall.net/http://www.je...
Upcoming SlideShare
Loading in...5
×

Intro To Test Driven Development

518

Published on

Slides to compliment code for my intro to Test Driven Development

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
518
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
10
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Intro To Test Driven Development

  1. 1. November 16, 2010 NWO-PUG 1 Intro to Test Driven DevelopmentIntro to Test Driven Development Chris TankersleyChris Tankersley Joind.in Link: http://joind.in/2347 E-mail: chris@ctankersley.com Twitter: @dragonmantank
  2. 2. November 16, 2010 NWO-PUG 2 Who Are You and Why Are You InWho Are You and Why Are You In My House?My House? Chris TankersleyChris Tankersley Been doing PHP for almost 8 years nowBeen doing PHP for almost 8 years now Lots of projects no one uses released under theLots of projects no one uses released under the BSD licenseBSD license Contributer to the Habari ProjectContributer to the Habari Project
  3. 3. November 16, 2010 NWO-PUG 3 What is Test Driven Development?What is Test Driven Development? „„Test-driven development (TDD) is a softwareTest-driven development (TDD) is a software development process that relies on the repetitiondevelopment process that relies on the repetition of a very short development cycle: first theof a very short development cycle: first the developer writes a failing automated test case thatdeveloper writes a failing automated test case that defines a desired improvement or new function,defines a desired improvement or new function, then produces code to pass that test and finallythen produces code to pass that test and finally refactors the new code to acceptable standards.”refactors the new code to acceptable standards.” http://en.wikipedia.org/wiki/Test-driven_development
  4. 4. November 16, 2010 NWO-PUG 4 Why Do TDD?Why Do TDD? ● Considered a Best Practice amongst almost allConsidered a Best Practice amongst almost all languageslanguages ● Provides confidence in the codeProvides confidence in the code ● Provides confidence in the requirementsProvides confidence in the requirements ● Proves remediationProves remediation
  5. 5. November 16, 2010 NWO-PUG 5 TDD is EasyTDD is Easy 1)1)Write a TestWrite a Test 2)2)Watch it FailWatch it Fail 3)3)Write CodeWrite Code 4)4)TestTest 5)5)Repeat 3 and 4 until PassingRepeat 3 and 4 until Passing 6)6)Repeat AllRepeat All
  6. 6. November 16, 2010 NWO-PUG 6 Our Sample ApplicationOur Sample Application ● Create an application to test basic math skillsCreate an application to test basic math skills ● We need a Calculator to add numbersWe need a Calculator to add numbers ● Needs to handle bad inputNeeds to handle bad input ● We need a Tutor class to test answersWe need a Tutor class to test answers
  7. 7. November 16, 2010 NWO-PUG 7 [CODE][CODE]
  8. 8. November 16, 2010 NWO-PUG 8 LinksLinks ● PhpUnitPhpUnit ● http://www.phpunit.de/http://www.phpunit.de/
  9. 9. November 16, 2010 NWO-PUG 9 Thanks toThanks to ● Jeremy KendallJeremy Kendall ● http://www.jeremykendall.net/http://www.jeremykendall.net/
  10. 10. November 16, 2010 NWO-PUG 9 Thanks toThanks to ● Jeremy KendallJeremy Kendall ● http://www.jeremykendall.net/http://www.jeremykendall.net/
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×