Your SlideShare is downloading. ×
  • Like
Tdd   let the tests be your guide.pptx
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Tdd let the tests be your guide.pptx

  • 343 views
Published

How TDD is done

How TDD is done

Published in Technology , Education
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
343
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
6
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Test-Driven DevelopmentLet the tests be your guide
  • 2. It startswiththe test
  • 3. Benefits of TDD¡  All the benefits of unit testing plus …¡  It becomes hard to create errors in the first place ¡  You almost have to try to create errors¡  Better matches the business requirements¡  It does what it is supposed to do ¡  It must because we only write tests that satisfy requirements¡  Encourages communication with the business¡  It eliminates gold plating
  • 4. Red, green, refactor¡  asdf
  • 5. The red phase
  • 6. You want to write positivetests and negative tests¡  Negative tests involve values that are outside acceptable ranges. ¡  They should fail ¡  Youre testing to make sure that they do¡  Positive tests are ones that should pass
  • 7. The greenphase
  • 8. The refactoringphase
  • 9. Once finished you pick up auser story and start againwriting a new failing test
  • 10. Refactoring example
  • 11. Summary¡  Unit testing is the cornerstone of TDD¡  TDD = Red, green, refactor¡  Red = write a failing unit test¡  Green = make the unit test pass using a naïve implementation¡  Refactor = improve the code quality¡  TDD results in huge benefits like better quality code that better matches the business requirements, encourages communication and eliminates gold plating