17. 3 Laws of TDD
● You must write a failing test before you write any
production code.
- Robert C. Martin (Uncle Bob)
● You must not write more of a test than is sufficient to
fail, or fail to compile.
● You must not write more production code than is
sufficient to make the currently failing test pass.
18. Benefits
● Documented code
● Better code reviews
● Rewarding
● Refactor with Confidence
● Faster development cycles
● Less Debugging
19. Notes
● Always test the interfaces, Requirements are stable,
implementations are not.
● Follow a clean architecture.
● Practice. Practice. Practice. Make it a habit.
● Split the code, if tests become more.
● If not for product, do it for you.
● If not for you, do it for the next developer.
24. ● “Ruby Midwest 2011 - Keynote: Architecture the Lost Years
by Robert Martin”
https://www.youtube.com/watch?v=WpkDN78P884
● “The Three Laws of TDD (Featuring Kotlin)”
https://www.youtube.com/watch?v=qkblc5WRn-U
● Growing Object-Oriented Software: Guided By Tests
by Steve Freeman
References