Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
TDD for the
Masses
Jorge D. Ortiz-Fuentes
@jdortiz
#TDD4Masses
A Canonical
Examples
production
#TDD4Masses
Legal
disclaimer
– YOU
“I know how to write unit tests”
– YOU
“My name is ____ and I don't always
write tests for my code”
Tests are for the
modelNo
#TDD4Masses
Agenda
TDD
Unit testing a Table View
Controller from scratch
Get it to run
Win or
Fail!
MVP intro
MVP
ViewPresenterModel
display orders
events
fetch/change

data
3min TDD Crash
Course
Do you test FIRST?
#TDD4Masses
FIRST
Fast
Isolated
Repeatable
Self-verifiable
Timely
Do you test FIRST?
#TDD4Masses
TDD Dance
Red
Green
Refactor
Write test ❌
Write simplest code to pass test ✅
Improve code 👷
Choose next functi...
#TDD4Masses
Simplest Code
Hard coded
Closer to the beginning of scope
Less indented
Shorter
Credit Ray Osherove
Demo
#TDD4Masses
Recap
Red, Green, and Refactor
Add min amount of code to pass
TDD is not only possible, but useful&cool!
Great...
http://bit.ly/TDD-
CmdU
Thank
you!
@jdortiz
#TDD4Masses
Upcoming SlideShare
Loading in …5
×

TDD for the masses

418 views

Published on

Slides of my talk at the Cmd+U Conference with live coding. The code can be found here: http://bit.ly/TDD-CmdU

Published in: Technology
  • Be the first to comment

TDD for the masses

  1. 1. TDD for the Masses Jorge D. Ortiz-Fuentes @jdortiz #TDD4Masses
  2. 2. A Canonical Examples production #TDD4Masses
  3. 3. Legal disclaimer
  4. 4. – YOU “I know how to write unit tests”
  5. 5. – YOU “My name is ____ and I don't always write tests for my code”
  6. 6. Tests are for the modelNo
  7. 7. #TDD4Masses Agenda TDD Unit testing a Table View Controller from scratch Get it to run
  8. 8. Win or Fail!
  9. 9. MVP intro
  10. 10. MVP ViewPresenterModel display orders events fetch/change
 data
  11. 11. 3min TDD Crash Course
  12. 12. Do you test FIRST?
  13. 13. #TDD4Masses FIRST Fast Isolated Repeatable Self-verifiable Timely
  14. 14. Do you test FIRST?
  15. 15. #TDD4Masses TDD Dance Red Green Refactor Write test ❌ Write simplest code to pass test ✅ Improve code 👷 Choose next functionality 🤔 Loop until done 🔄
  16. 16. #TDD4Masses Simplest Code Hard coded Closer to the beginning of scope Less indented Shorter Credit Ray Osherove
  17. 17. Demo
  18. 18. #TDD4Masses Recap Red, Green, and Refactor Add min amount of code to pass TDD is not only possible, but useful&cool! Great coverage Views can be tested Good architecture helps
  19. 19. http://bit.ly/TDD- CmdU
  20. 20. Thank you!
  21. 21. @jdortiz #TDD4Masses

×