Tuesday, March 27, 2007

Test-driven development is hard!

I'm on a consulting gig at the moment and the team is collectively trying very hard to embrace test-driven development (TDD). We have an agile process lead or meanie as he likes to be referred to and this meanie does a great job of keeping us focused on having a good test suite and a thriving, evolving code base. However, we're under a tight deadline for the first release of our product and I keep wondering when the ax will fail from the business. When will they tell us that we either make the deadline with all the features or we're looking for new gigs this summer. I absolutely believe in test driven development and the benefits that TDD affords to software projects. Unfortunately, businesses typically don't understand or cannot evaluate the importance of TDD. Come hell or high water, we're going to hit this date. Our project team is already behind in the amount of features that we should have implemented by now and I really feel like our development velocity has been all over the board and has not settled out into a semi-predictable range. Time will tell how this goes off, but I have learned the importance of driving development with tests. I've done testing before, but this time we're really focusing on pulling development forward with tests. It takes an enormous amount of discipline, at least for me.

On a related note around TDD, one beef I have with Visual Studio 2005 is that it's not geared for incremental compilation and testing cycles. It's always compile and packaging bytecode into DLLs and EXEs. That really starts to hurt when your solution has lots of projects and the projects start to get a lot of source files in them. Java is much nicer in this regard. You compile to .class files and run your tests. No packaging required. Heck, if you're using an incremental compiler like the Eclipse compiler, the compilation step is almost negligible. I am becoming a big fan of NUnit and attributed tests and test fixtures.

Powered by ScribeFire.

1 comment: