1. Email (firstname.lastname@example.org)
2. About Testing!
Test Last or DDD (Design Driven Tests)
3. Short development iterations
Is a design process
Based on requirement and pre-written test
Tests are your first users
The goal is to produce working clean code that
If TDD hurts then you're doing it wrong
5. Makes you think about required behavior.
Reduces speculative code.
Less time debugging.
Confidence in change
Discover usability issues early
6. I don’t have time to unit test.
The client pays me to develop code, not write
I am supporting a legacy application without
QA and User Acceptance Testing is far more
effective in finding bugs.
I don’t know how to unit test, or I don’t know
how to write good unit tests.
7. It forces you to really understand the code.
It forces you to really understand the tests
It forces you to create code that is truly reusable
and modular and testable
These forces drive you to keep your code and
your tests simple and easy to understand.
8. Enabling TDD
Choosing the First Test?
Green Bar Patterns
State-based vs. Interaction-based Unit Testing
10. create a
n clarify enough
intent to pass
12. The simplest.
If you need to write code that is untested,
choose a simpler test.
If the essence approach takes to much time to
implement, choose a simpler test.
13. Small and focused
Have no side-effects
14. Description should be
• Suitable for customer comprehension
• Understandable in absence of code
• Think about behavior
• Think about the context of the behavior
• Focus on the words, not the implementation
15. Fake It(Til You Make It)
Start with hardcoded results and wait until later
tests to force them to become real.
Triangulate To Abstraction
Make the code abstract only when you have two or
aka Don't Be Stupid
If you really, really, honestly know the right way to
implement it, then write it that way.