I agree with James and Ed. Writing test cases and using code metrics tools to measure the test coverage is a a good recipe for a successful software life cycle management strategy. While practicing Continuous Integration (CI) running these unit tests and make sure build does not fail is an important principle (See
http://www.martinfowler.com/articles/continuousIntegration.html). However, keeping the CI build with in 10 minutes is another important guideline. So, while writing unit tests, keep that in mind and write independent tests for online & offline (example tests involve database connection) consumption. These CI builds must be run in stages to achieve the 10 minutes guidelines. How to achieve this using Hudson-3.x is covered in our book.