Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
LESSONS LEARNED IN UNIT TESTING Alison Barrett WordCamp San Francisco 2013
Slide 2
Slide 2 text
No content
Slide 3
Slide 3 text
10 != 1
Slide 4
Slide 4 text
Write better code.
Slide 5
Slide 5 text
I want to inspire you.
Slide 6
Slide 6 text
Currently: Testing by debugging
Slide 7
Slide 7 text
We can do better.
Slide 8
Slide 8 text
Automation saves time Debugging is easier Code is future-proof Architecture is modular Tests double as documentation WHY?
Slide 9
Slide 9 text
AUTOMATION photo by pasukaru76
Slide 10
Slide 10 text
Good, Fast, Cheap. Pick two.
Slide 11
Slide 11 text
Writing unit tests: Good
Slide 12
Slide 12 text
Running unit tests: Good, Fast, Cheap
Slide 13
Slide 13 text
DEBUGGING photo by pasukaru76
Slide 14
Slide 14 text
......F..F...F..FFF.......................... ran 45 tests these 6 failed
Slide 15
Slide 15 text
test_matches_browser_test MarkupA8CLinkTest 6) :: Failed asserting that 'test:/alisothegeek/?rev=3389asdf' does not match PCRE pattern "%(?
Slide 16
Slide 16 text
FUTURE-PROOF photo by dunechaser
Slide 17
Slide 17 text
Refactoring
Slide 18
Slide 18 text
No content
Slide 19
Slide 19 text
MODULARITY photo by georgivar
Slide 20
Slide 20 text
Unit testing not entire class testing not contents-of-a-file testing
Slide 21
Slide 21 text
No content
Slide 22
Slide 22 text
No content
Slide 23
Slide 23 text
DOCUMENTATION photo by ercwttmn
Slide 24
Slide 24 text
No content
Slide 25
Slide 25 text
WRAPPING UP photo by .guin
Slide 26
Slide 26 text
Write better code.
Slide 27
Slide 27 text
@alisothegeek alison.barre.tt QUESTIONS? All photos licensed under the Creative Commons Attribution license.