Upload
gerard-sychay
View
1.897
Download
0
Embed Size (px)
DESCRIPTION
In which I give a short introduction to unit testing, and then outline the story that finally turned on the light bulb about real test-driven development and test first for me. The third part of the talk gives an introduction to Dependency Injection (DI), an integral part to unit testing.
Citation preview
My Road To Test Driven
Development: A Story
Gerard Sychay@oinkpug
08/19/2009
My name is Gerard Sychay.
Zipscene.com
Cincinnati Coworks
Are you unit testing?
Are you developing unit tests first?
(Very) Short introduction to unit testing1.
“Discovering” Test Driven Development2.2.
Dependency Injection FTW!3.
PHPUnit
(Very) Short introduction to unit testing1.
(Very) Short introduction to unit testing1.
(Very) Short introduction to unit testing1.
“Red, green, refactor.”
Discovering Test Driven Development2.
That’s nice, but…
Discovering Test Driven Development2.Discovering Test Driven Development2.
Discovering Test Driven Development2.
Then, one day…
Discovering Test Driven Development2.
Problem: Does this event “exist?”
Discovering Test Driven Development2.
Discovering Test Driven Development2.Business Requirements:
1. If two events have the same name AND same location, they are the same event. Merge.
2. Else, if two events have the same location, AND they occur within 1 hour of each other, they are the same event. Merge.
Discovering Test Driven Development2.
Discovering Test Driven Development2.
Discovering Test Driven Development2.
Discovering Test Driven Development2.
Discovering Test Driven Development2.
Discovering Test Driven Development2.
Discovering Test Driven Development2.Discovering Test Driven Development2.
Discovering Test Driven Development2.Business Requirements:
3. To merge two events, for each field, keep the longer of the two fields. For DateTimes, keep the earlier occurrence.
Discovering Test Driven Development2.
Discovering Test Driven Development2.Discovering Test Driven Development2.
Discovering Test Driven Development2.Discovering Test Driven Development2.
“Is that bug really fixed?”
Discovering Test Driven Development2.
“Hey, I thought that bug was fixed.”
Discovering Test Driven Development2.
Discovering Test Driven Development2.Discovering Test Driven Development2.Discovering Test Driven Development2.
Discovering Test Driven Development2.Discovering Test Driven Development2.
Requirements Driven Development
Discovering Test Driven Development2.
That’s nice, but…
Discovering Test Driven Development2.
Dependency Injection FTW!3.
Dependency Injection FTW!3.
MVC, n’est pas?
Dependency Injection FTW!3.
Dependency Injection FTW!3.
Dependency Injection FTW!
Dependency Injection FTW!3.
Dependency Injection FTW!3.Dependency Injection FTW!3.
Dependency Injection FTW!3.Dependency Injection FTW!3.
Business Requirements:
4. Profit!
Dependency Injection FTW!3.
Thanks!Questions!Comments!
@hellogerardstraylightrun.net
© 2009. Some rights reserved.