Tests and Testability
Presented by Ned Batchelder
Testing software is difficult. Large complex systems don't lend themselves naturally to automated testing. This isn't just because they are large, it's because developers often don't consider how testable their code is. Testability is as important as all the other -ilities in your code (portability, maintainability, efficiency, etc).
Testability is a characteristic of your code that makes it easier to test. Increased testability can give you better tests, but it also gives you just plain better code. Improving testability generally means considering the interfaces to your internal modules and improving them to provide better modularity. This improvement often has benefits in your product code.
I'll discuss specific examples to demonstrate how code can be made more testable. Mocks, dependency injection, and crisp API design are just a few of the techniques that can improve your code's testability and make you a happier person.