I keep hearing how Test Driven Development is an unfortunate name for the technique because TDD is not about Testing, it's about design.

Personally, I've never had a problem with the name simply because I've always thought about it more as a way to program to a specification. I've never had a problem with the fact that the code that is verifying that I've met the spec has the word 'test' in a class name, method name, annotation, or attribute. It's a convention I've followed in order to have test frameworks do the heavy lifting for me.

I'm not the most dogmatic about my approach, although I do try to write my tests first, I often find myself inspired to write some extra code which I then try to wrap in tests. I do tend to find that TDD outsmarts me from an API-design perspective every time I do that though (and I inevitably end up refactoring my non-tested code as soon as I start writing tests around it), but the point is I'm okay with not writing all tests up-front as long as I end up with a test harness around everything of interest when I'm done.

So, back to the question. What would be a better name for TDD? Would a name that didn't involve the word 'test' make a difference?

Are you asking why we don't call it "development driven by testing"? Is that the question? Or are you complaining that you don't write all tests first? Or are you asking if it's okay to not write all tests before all code? I can't follow the question.
–
S.LottAug 14 '09 at 19:23

5 Answers
5

Test driven development is not a way of testing, it's a way of developing (including design, coding and testing). Otherwise it would be called development driven testing.

The verb of the phrase "test driven development" is development, "test-driven" is just the adverb. You should explain that to whoever is giving you grief over the term.

I have absolutely no problem with the name since it accurately reflects the intent. And you don't have to have all your tests finished before starting development but you should have them specified at least.

In my (subjective) opinion, I believe that the reason some people started the campaign against the word 'Test' in Test-Driven Development was because of bad experience with explaining the concept to certain types of developers.

There are developers who, as soon as they hear the word 'Test', stop listening - they think it's not their job, so why should they care? That attitude is obviously detrimental if you need people to adopt the practice of TDD. If one solution to that problem is to rename TDD into something that does not include the word 'Test', then fine by me, but for the rest of us, let's just continue to call it TDD.

I've seen at least the following terms suggested:

Test-Driven Development (the original term)

Test-Driven Design (because it's more about design)

Example-Driven Design (because tests could be viewed as examples of how the code is supposed to work)

Design-by-Example (just another phrase for EDD)

Behavior-Driven Design (the declared intent was different, but most attempts so far has looked a lot like TDD with some extra verbosity added)

Even though 'Design' is very important to me, I still think the tests provide value. Sure, they are not QA tests, but the entire mass of tests as a by-product of TDD still provide the safety net that allow you to refactor with confidence. In fact, Refactoring has an entire section on unit testing, because Fowler viewed it to be very dangerous to attempt refactoring without a regression test suite.

Had a discussion with an anti-tester recently, his main argument against it was that it takes too long. When I asked him how he verifies that his code works, he said told me that he opens the debugger and steps through it. Blew my mind.
–
RKitsonAug 14 '09 at 17:33

I think Test Driven Development is fine. That's what it is. Yes, it affects the design. Yes, it improves the quality. Yes, it improves the overall maintainability and ability to refactor. Yes it's faster. Etc.

I think of BDD as a different, more specific practice. But maybe it's more in line with the original intent of TDD than tools like JUnit promoted.

Is it a bad name because it speaks more towards the process than the benefits? Maybe.