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.
TESTDRIVENDEVELOPMENT
View Slide
i’m @qrush
@i live here
ci work at 37signals
TESTING!
2/4/12
4/13/12
test-driven!
whatistesting?
REFRESHINGCOMPILINGFOR SOMEONEELSE TO DOnot:
TESTINGDEFINES HOWYOUR CODEWORKS
why shouldi test?
PREDICTABILITY
TIGHTERFEEDBACKLOOPS
DEPENDABILITY
LOOSE COUPLING
how doyou testsomething?
PICK ANYLANGUAGE
PICK ANYFRAMEWORK
SAMESTEPSSAMEPATTERNS
4 PHASETEST
setupexerciseverificationteardown
what isTDD?
WRITE TESTSFIRST
WRITE NEWCODE ONLYON TESTFAILURE
write a testwatch it failmake it passrepeat
RHYTHM
redgreenrefactor
does thistake longer?
YES
INITIALLY,BUT ITCAUSESLESS BUGS** http://bit.ly/nugeo
does thissucksometimes?
BUT ITPROVIDESCONFIDENCE
is it oknot to test?
JUSTSPIKEIT
BUTTHROWIT AWAY
finally,
FIND AJOB*THAT HELPSYOU TEST
ASKABOUTPOLICIES ONTESTING
GOTESTYOUR CODE!