This document discusses automated software testing and test-driven development. It covers topics like the benefits of automated testing, dependency injection, testing with mocks, tips for testing, and things that make code difficult to test.
5. Should you write tests?
- Truth about booking.com
“Booking is destroying my career (…)
I am not allowed to write tests”
“I don’t do tests”
- David Thomas
A/B testing
Some unit tests
Very experienced
Writes tests for complex algorithm
6. Benefits of automated tests
• Catch regression errors
• Drives the design of the code
• Serves as documentation
17. Things that makes testing
harder
• Inheritance
• Static methods
• Global state
• Mixing of concerns
• Top 10 things which make your code hard to
test
25. Where to learn more?
Inversion of Control Containers
and the Dependency Injection
pattern
- Martin Fowler, 2004
Writing Great Unit Tests:
Best and Worst Practice
- Steve Sanderson, 2009