The 3 rules of TDD
by Robert C Martin (uncle bob)
1. Don't write production code except to pass a failing test
Writing Tests !== TDD
2. Write only enough test code to demonstrate a failure
3. Write only enough production code to pass the test

Tdd Advantges
- Decoupled design - Testable -> Decoupled
- Decrease & mitigate defects
- Base for continuous delivery
- Less QA efforts - 2 QA vs ~20 Dev
- Shorten debug time
- You know your code was green 2 min ago
- Design docs
But most importantly:
No fear in refactoring, maintaining and enhancing your application
Why Test-After sucks
- Boring - u already know it works
- Tend to skip difficult tests - the code already works, it's not a must. . .
- Feels like a waste / chore / homework, not the dev's work
- Miss testing "obvious" things
- No Trust
Bottom line - The test suite has holes
- Karma - test runner
- Jasmine - js testing framework
- Protractor
Testing technologies



TDD Introduction
By Shahar Talmi
TDD Introduction
- 1,484