Test Driven Development Has Become the Norm
Test First Development is an evolutionary development technique where you write a unit test before writing just enough production code to fulfill that test. Refactoring is a development technique where you make a change to the design of your code or database schema which improves its quality without changing its semantics. Test Driven Development (TDD) combines these two. When applied in a disciplined way, TDD has been shown to produce many benefits, including significantly increased software quality and improved response-time for software teams with volatile codebases, which otherwise would degrade and slow the team down.
In his article, Ambler addresses five commonly heard objections, explaining how they are based on misconceptions:
- You create a 100-percent regression test suite.
- The unit tests form 100 percent of your design specification.
- You only need to unit test.
- TDD doesn't scale.
"My experience is that TDD has become the norm within the agile software development community and has also been adopted by many "traditional" developers as well. TDD should be seen as complementary to modeling approaches, and as I've argued with AMDD the two can and should be used together. TDD does not replace traditional testing, instead it defines a proven way to ensure effective unit testing."Note, this is an interesting balance to his statements in January, which were widely (mistakenly?) perceived as denying the need for traditional testing. See Floyd Marinescu's first-person account of the meeting.
So, should you explore TDD now, or wait until competetive pressure makes it necessary? Ambler's article lays out some reasons to consider it.
Read more on testing.
To obtain good code, writing tests and code is faster then code alone
by
Dan Bunea
Ron Jeffries, said this on the TDD yahoo mailing list a few months ago. Trying to prove it and to show that TDD actually scales much better then anything else I wrote a small experiment at: danbunea.blogspot.com/2006/06/to-obtain-good-co...
For tests there are also good practices, that need to be followed, and I also found a great test practice patterns, collected by Gerard Meszaros is at: xunitpatterns.com/
Dan
Re: To obtain good code, writing tests and code is faster then code alone
by
Geoffrey Wiseman
That said, there are a number of circumstances in which a business might choose to do without some of those qualities; I'm inclined to believe this happens too often, but I'm also inclined to believe that it is, most of the time, a business decision.
Re: To obtain good code, writing tests and code is faster then code alone
by
Deborah Hartmann
> time, a business decision.
Geoffrey, do you mean "a bean-counter decision" as in "it has to be cheaper to have twice as many people coding" ? Or something else?
Educational Content
Managing Build Jobs for Continuous Delivery
Martin Peston May 24, 2013
Clojure in the Field
Stuart Halloway May 23, 2013
Tuning the Size of Your Thread Pool
Kirk Pepperdine May 23, 2013




Hello stranger!
You need to Register an InfoQ account or Login to post comments. But there's so much more behind being registered.Get the most out of the InfoQ experience.
Tell us what you think