Test drivendevelopment   onstage demo
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Test drivendevelopment onstage demo

on

  • 365 views

Test-driven development (TDD) is a skill that takes patience to master—you can’t learn it reading a book. As with learning any new language, to gain fluency you need to practice TDD with competent ...

Test-driven development (TDD) is a skill that takes patience to master—you can’t learn it reading a book. As with learning any new language, to gain fluency you need to practice TDD with competent coaching and lots of hard work. Many well-intentioned programmers try and finally give up on TDD because they never develop the fluency it requires. On stage, Llewellyn Falco leads a live TDD demonstration, talking through the process and microsteps of: (1) studying a feature, (2) creating an initial test, and (3) iteratively developing the related test code and feature code until the feature is completely programmed. Watch how to iteratively write a test, see it fail, and then write the feature code to make it pass. After explaining the theory behind the particular TDD technique used, Llewellyn leads participants in testing progressively more complex objects and scenarios.

Statistics

Views

Total Views
365
Views on SlideShare
365
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Both
  • Both
  • Both
  • Both
  • Both
  • Both
  • Both
  • Both
  • Both
  • Both
  • Both
  • Both
  • Both
  • Both
  • Both
  • Both
  • Both
  • Both
  • Both
  • Both
  • Both
  • I add this slide at the end of EVERY presentation.
  • Both

Test drivendevelopment onstage demo Presentation Transcript

  • 1. Test Driven Development An On-stage Demonstration @LlewellynFalco
  • 2. A littleHISTORY…
  • 3. Is Testing Faster? (Test After) 60 Minutes Work (code) X minutes Non-Work(tests) Code < 60 Minutes Code + Test 60 + X minutes
  • 4. Is Testing Faster? (Test 1st) 60 – Time Saved 30 Minutes Work (code) X minutes Non-Work(tests) Code 60 Minutes < ? Test + Code X + 30 minutes
  • 5. Today’s Kata: Triangle 1) A side has a distance 2) Side knows endpoints 3) 3 points 4) 3 sides 5) Perimeter 6) Get sides touching a point 7) Get side opposite a point 8) The angle of 2 sides touching a point 9) 3 angles 10) Right Triangle
  • 6. Parts of a Test1) Do2) Verify
  • 7. Demo
  • 8. Benefits of Unit Tests1) Specification2) Feedback3) Regression4) Granularity
  • 9. RegressionIf I used to get :Then I still get :
  • 10. Intentional Code// Create a Side from (0,0) to (5,0)var side = new Side(0,0,5,0);
  • 11. 7H15 M3554G3 53RV35 7O PR0V3 H0W 0UR M1ND5 C4N D04M4Z1NG 7H1NG5! 1MPR3551V3 7H1NG5! 1N 7H3 B3G1NN1NG 17 WA5 H4RD BU7 N0W, 0N 7H15 LIN3 Y0UR M1ND 1S R34D1NG 17 4U70M471C4LLY W17H 0U7 3V3N 7H1NK1NG 4B0U7 17, B3 PROUD! 0NLY C3R741N P30PL3 C4N R3AD 7H15. U C4N R35D 7H15!!!
  • 12. Consume 1stWrite the objects & methods you wish existed
  • 13. Test Until BoredTest the cases that bring you value
  • 14. Verification Is it the right answer? 1. Change the Question 2. Ask an expert
  • 15. Completing the CircleYour output should tell the story.Objects should have ToStrings Benefits 1. Specification 2. Feedback 3. Regression 4. Granularity
  • 16. Fake it Till You Make ItBuys some timeAllows for Triangulation
  • 17. Today’s Kata: Triangle 1) A side has a distance 2) Side knows endpoints 3) 3 points 4) 3 sides 5) Perimeter 6) Get sides touching a point 7) Get side opposite a point 8) The angle of 2 sides touching a point 9) 3 angles 10) Right Triangle
  • 18. Verifying MultiplesVerify Single:Approvals.Verify(result);Verify Many:Approvals.VerifyAll(results, "label");
  • 19. Multiple CasesApprovals.VerifyAll(cases, c =>TestWith(c));
  • 20. Maintaining TestsSame Quality as Production Code
  • 21. Granularity of Test?
  • 22. Resources Test Driven Development: By Example Kent Beck
  • 23. Resources www.ApprovalTests.com (.net, java, php, ruby) Herding Code Podcast
  • 24. www.ApprovalTests.com (.net, java, php, ruby)Resources 20 episode youtube series
  • 25. Resources www.Develop.comIntro To TDD Class (4 Day)Legacy Code
  • 26. TeachingKidsProgramming.orgDo a Recipe  Teach a Kid (Ages 10 ++)Microsoft SmallBasic, Java  Free Courseware (recipes)
  • 27. Please fill out evaluations:TDD – Demo #AW11 @LlewellynFalco http://LlewellynFalco.Blogspot.com http://www.approvaltests.com