28. TDD Cycle of life
Failing Test
Pass testRefactoring
29. Check List
1. History of TDD
2. TDD Cycle of life
1. Red phase
2. Green phase
3. Refactoring
3. Tests measurement
4. TDD Tips
5. BDD
6. TDD is dead?
7. PHPSpec
30. Tests measurement
1. Code Coverage
2. Underlay Defects
- 100 % code coverage != Error Free
- Vendor code should have 100% code
coverage, but yours not necessarily
32. TDD Tips
1. Create a check list of tests
2. Small step approach during
refactorization (or larger when fealing
comfortable)
33. TDD Tips
1. Create a check list of tests
2. Small step approach during refactorization (or
larger when fealing comfortable)
3. Add problems to the list, instead of
resolving them immediately
34. TDD Tips
1. Create a check list of tests
2. Small step approach during refactorization (or
larger when fealing comfortable)
3. Add problems to the list, instead of resolving
them immediately
4. Never create new test if previous one is
failing
35. TDD Tips
1. Create a check list of tests
2. Small step approach during refactorization (or
larger when fealing comfortable)
3. Add problems to the list, instead of resolving
them immediately
4. Never create new test if previous one is
failing
5. Remove repetition (between code and test
too!)
36. TDD Tips
1. Create a check list of tests
2. Small step approach during refactorization (or
larger when fealing comfortable)
3. Add problems to the list, instead of resolving
them immediately
4. Never create new test if previous one is
failing
5. Remove repetition (between code and test
too!)
6. Tests should be fast and isolated
37. TDD Tips
1. Create a check list of tests
2. Small step approach during refactorization (or
larger when fealing comfortable)
3. Add problems to the list, instead of resolving
them immediately
4. Never create new test if previous one is
failing
5. Remove repetition (between code and test
too!)
6. Tests should be fast and isolated
7. Test only public
38. TDD Tips
1. Create a check list of tests
2. Small step approach during refactorization (or
larger when fealing comfortable)
3. Add problems to the list, instead of resolving
them immediately
4. Never create new test if previous one is failing
5. Remove repetition (between code and test too!)
6. Tests should be fast and isolated
7. Test only public
8. Write your own tests, don’t wait for a
teammate
40. Check List
1. History of TDD
2. TDD Cycle of life
1. Red phase
2. Green phase
3. Refactoring
3. Tests measurement
4. TDD Tips
5. London vs Brooklyn
6. BDD
7. TDD is dead?
8. PHPSpec
41. Behavior Driven Development
- Based on TDD
- Test behavior, not code!
- Domain Driven Desing
- DSL in test tools
- „it_should”
- Gherkin [Given, When, Then]
- Tests as specification
42. Check List
1. History of TDD
2. TDD Cycle of life
1. Red phase
2. Green phase
3. Refactoring
3. Tests measurement
4. TDD Tips
5. London vs Brooklyn
6. BDD
7. TDD is dead?
8. PHPSpec
43. TDD is Dead?
Who said that ?!
David Heinemeier Hansson (RoR author and
Bacecamp founder)
http://martinfowler.com/articles/is-tdd-dead/
http://www.infoq.com/news/2014/06/tdd-dead-
controversy
44. Check List
1. History of TDD
2. TDD Cycle of life
1. Red phase
2. Green phase
3. Refactoring
3. Tests measurement
4. TDD Tips
5. London vs Brooklyn
6. BDD
7. TDD is dead?
8. PHPSpec