• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Tdd   let the tests be your guide.pptx
 

Tdd let the tests be your guide.pptx

on

  • 665 views

How TDD is done

How TDD is done

Statistics

Views

Total Views
665
Views on SlideShare
665
Embed Views
0

Actions

Likes
0
Downloads
5
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Adobe PDF

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

    Tdd   let the tests be your guide.pptx Tdd let the tests be your guide.pptx Presentation Transcript

    • Test-Driven DevelopmentLet the tests be your guide
    • It startswiththe test
    • 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
    • Red, green, refactor¡  asdf
    • The red phase
    • 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
    • The greenphase
    • The refactoringphase
    • Once finished you pick up auser story and start againwriting a new failing test
    • Refactoring example
    • 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