Can anyone recommend some best-practices on how to tackle the problem of starting to UnitTest a large existing CodeBase? The problems that I'm currently facing include:
- HUGE code base
- ZERO existing UnitTests
- High coupling between classes
- Complex OM (not much I can do here - it's a complex business domain)
- Lack of experience in writing UnitTests/TDD
- Database dependency
- External sources dependencies (Web services, WCF services, NetBIOS, etc)
Obviously, I understand that I should start with refactoring the code, to make it less coupled, and more testable. However, doing such refactoring is risky without UnitTests (Chicken and Egg, anyone?).
On a side note, would you recommend starting the refactoring and writing test on the Domain classes, or on tier classes (logging, utilities, etc)?