in reply to Adding Unit tests to the development cycle

Testing is not about saving time in the short-term. Testing takes time and learning to write good tests takes time. I'd estimate that on my current project we spend anywhere from 25% to 50% of our time writing and maintaining automated tests. I find claims that you'll cut time on small projects by writing tests to be unsupportable. Larger projects may show gains as the complexity of a job mounts, but I don't have any hard data to show you.

One benefit of testing you didn't mention is increased flexibility. There are a whole class of changes that you simply won't do without a complete regression suite to back you up. Major refactoring is basically unthinkable without tests. That means that code without tests ages faster and has to be rewritten more often, a task with an enormous price-tag for a complex system.

I think your best bet is to give it a try and see how it goes. Tell your boss you think it'll add a small amount of time to the project but that the pay-off will be well worth the wait. If your boss is smart he'll understand why you can't be more specific till you try it!

-sam

  • Comment on Re: Adding Unit tests to the development cycle

Replies are listed 'Best First'.
Re^2: Adding Unit tests to the development cycle
by adrianh (Chancellor) on Jun 05, 2006 at 12:57 UTC
    I find claims that you'll cut time on small projects by writing tests to be unsupportable. Larger projects may show gains as the complexity of a job mounts, but I don't have any hard data to show you.

    As a counter point I find that doing test-first testing does cut the time - even for smaller projects. The time I spend writing tests is more than made up by the time I save by not debugging broken code.

    Of course I too have no hard and fast numbers - just personal experience :-)