Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Jorge Ortiz: TDD for the Masses

1fa9cb8c7997c8c4d3d251fb5e41f749?s=47 Realm
July 08, 2016

Jorge Ortiz: TDD for the Masses

1fa9cb8c7997c8c4d3d251fb5e41f749?s=128

Realm

July 08, 2016
Tweet

Transcript

  1. TDD for the Masses Jorge D. Ortiz-Fuentes @jdortiz #TDD4Masses

  2. A Canonical Examples production #TDD4Masses

  3. Legal disclaimer

  4. – YOU “I know how to write unit tests”

  5. – YOU “My name is ____ and I don't always

    write tests for my code”
  6. Tests are for the model No

  7. #TDD4Masses Agenda ̣ TDD ̣ Unit testing a Table View

    Controller from scratch ̣ Get it to run
  8. Win or Fail!

  9. MVP intro

  10. MVP View Presenter Model display orders events fetch/change
 data

  11. 3min TDD Crash Course

  12. Do you test FIRST?

  13. #TDD4Masses FIRST ̣ Fast ̣ Isolated ̣ Repeatable ̣ Self-verifiable

    ̣ Timely
  14. Do you test FIRST?

  15. #TDD4Masses TDD Dance ̣ Red ̣ Green ̣ Refactor Write

    test ❌ Write simplest code to pass test ✅ Improve code Choose next functionality Loop until done
  16. #TDD4Masses Simplest Code ̣ Hard coded ̣ Closer to the

    beginning of scope ̣ Less indented ̣ Shorter Credit Ray Osherove
  17. Demo

  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. http://bit.ly/TDD- CmdU

  20. Thank you!

  21. @jdortiz #TDD4Masses