Test Driven Development

Test Driven Development

Intro to Testing, TDD, with many GIFs sprinkled in. Given at http://boston.io on 2/4/2012, UBHacking on 3/24/2012, and at RIT's ViSE program on 4/13/2012.

Eb8975af8e49e19e3dd6b6b84a542e26?s=128

Nick Quaranto

February 06, 2012
Tweet

Transcript

  1. TEST DRIVEN DEVELOPMENT

  2. i’m @qrush

  3. @ i live here

  4. c i work at 37signals

  5. TESTING!

  6. 2/4/12

  7. 4/13/12

  8. test-driven!

  9. what is testing?

  10. REFRESHING COMPILING FOR SOMEONE ELSE TO DO not:

  11. TESTING DEFINES HOW YOUR CODE WORKS

  12. why should i test?

  13. PREDICTABILITY

  14. TIGHTER FEEDBACK LOOPS

  15. DEPENDABILITY

  16. LOOSE COUPLING

  17. how do you test something?

  18. PICK ANY LANGUAGE

  19. PICK ANY FRAMEWORK

  20. SAME STEPS SAME PATTERNS

  21. 4 PHASE TEST

  22. setup exercise verification teardown

  23. what is TDD?

  24. WRITE TESTS FIRST

  25. WRITE NEW CODE ONLY ON TEST FAILURE

  26. write a test watch it fail make it pass repeat

  27. RHYTHM

  28. red green refactor

  29. None
  30. does this take longer?

  31. YES

  32. INITIALLY, BUT IT CAUSES LESS BUGS* * http://bit.ly/nugeo

  33. does this suck sometimes?

  34. YES

  35. BUT IT PROVIDES CONFIDENCE

  36. is it ok not to test?

  37. YES

  38. JUST SPIKE IT

  39. BUT THROW IT AWAY

  40. finally,

  41. FIND A JOB* THAT HELPS YOU TEST

  42. ASK ABOUT POLICIES ON TESTING

  43. GO TEST YOUR CODE!