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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With