If you can't read please download the document
Upload
john-chandler
View
1.276
Download
0
Embed Size (px)
Citation preview
Test Driven Development(a short introduction)
(C) John Chandler 2011
Perfect Code?
First Time?
Every Time?
(yeah right)
Confidence Through Tests
Manual Tests = Error Prone
Automated Tests = Repeatable
Writing Tests After the Code
Is Useful
Writing Tests Before the Code
Helps us...
Think about What
before we decide How
Write code that is
easy to test
Write small units
of code at a time
Ensure all code
has test coverage
Know when to
stop writing code
First we write a test that fails
Then we write code
to make the test pass
Did we break anything?
Are we more confident?
Refactor if necessary
Refactor with confidence
Then repeat until done
What else?
Fail Fast
Early Feedback
Easier to learn
unfamiliar code
Easier to change
unfamiliar code
Supplementary
code documentation
Give confidence
to Others
Continuous Integration
Now go write tests!