Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TDD and development time

Tags:

tdd

We are a small group of PHP developers contemplating on integrating or not TDD in our work flow to raise the quality of our web applications and at the same time eliminate the frustrating manual regression testing. My question is on the average how much development time would be added if we start using TDD?

like image 727
ian Avatar asked Jan 20 '26 04:01

ian


1 Answers

Don't count on TDD to raise your quality. Having a quality mindset is far more important. I've seen high-quality pre-TDD code that was heavily tested - because the team members had the drive to produce a product that they could take pride in. I've seen Agile XP teams doing TDD produce absolute crap because they didn't have any pride of ownership. If you have the pride of ownership, you can produce quality code with whatever process suits you.

So there's no guarantee that TDD will improve produce better quality. However, if your team has the drive to be better, and has an innate pride of ownership in what they're doing, then TDD will give you the opportunity to produce better code, not because it will be better tested, necessarily, but because it will change how your code is designed.

TDD can improve the design of individual classes. Be careful, though. There's a risk that you'll migrate complexity of of individuals objects and into the domain of object interaction, then not test that adequately, so make sure you test at that level, too.

If you're already unit testing, TDD will make development somewhat slower initially, but the difference should taper off in a few weeks.

If you're not unit testing, then unit testing (TDD or conventional) will save you time.

like image 95
Don Branson Avatar answered Jan 23 '26 20:01

Don Branson