Skip navigation.

Losing the "T" in TDD - what do you lose vs. what do you gain?

test driven development

In a recent post from Jason Gorman he discusses how some people drop the word 'Test' from Test-Driven Development.

I feel their pain... I've felt that way in the past but eventually changed my mind...

Jason explains emphasis of 'Test-Driven Development':

The problem with Test-driven Development is that it's got the word "test" in the title. It's actually not as much about tetsing your code as it is about using tests to specify what code you should write in the first place.

Emphasis of TDD

I'm not so sure that I entirely agree with this statement any more. I used to... For some time now, I've believed that it is as much about specifying what the code should do as it is about testing it...

I'd say it's first about specifying what your code should do; then it's about testing your code to confirm that it does, and continues to do, what it should do... furthermore we apply testing techniques (in a somewhat exploratory fashion) as we write each test (or jot down what tests we're going to write).

Just because it's first about something doesn't necessarily mean it's more about that something. Perhaps because the tests are automated, we tend to forget about the tests doing their testing thing (and that testing techniques were used to create them) once we move on from that class or story...

Honestly though - that is neither here nor there - I don't think it matters where the emphasis is... The fact that we even have this debate is (IMHO) a reaction to the negative effects of the word test... but what of the positive effects?

The 'T-Word'

With the word test in "Test-Driven Development" - I admit that there are pointless discussions to explain to the uninitiated that "no, it's not the sole responsibility of the testers and yes it's about behaviour specification".

Without the word test, we have the problem with pointless discussions to explain that "yes, it does benefit from using testing techniques to determine the 'examples of behaviour' and yes - skilled testers make a valuable contribution to the process".

I've sat on both sides of the 'T-word' fence and I think that it requires some judgement to decide which path you go down depending on the circumstances... what are you prepared to lose when you replace the 'T' in TDD?

The greatest thing that is lost, in my opinion, when we lose the word test is the value of developers becoming 'test-infected', and the resulting relationship that this encourages between previously segregated disciplines... 'behaviour-infected' or 'example-infected' just doesn't have the same effect - nor as nice a ring to it.

You might think that I'm biased... you'd be right... because a long time ago I first experienced the effects of truly 'test-infected' developers (on a team with a certain Antony Gorman) who embraced both testing and testers in a way I'd not seen before...

When we drop the word test we do lose more than just the word. We lose an important effect on team dynamics arising from 'test-infection'. When we do this, we are admitting defeat in our attempt to overcome our audience's assimilation bias. Admitting that we can't explain TDD in a way that helps the audience move beyond their own preconceptions arising from the word 'Test'... Failing to help them understand the initial (but not necessarily primary) purpose of TDD - design - whilst helping them to also see the relevance of tests and associated skills and techniques.

To those who advocate the substitution of the word 'test'... I ask, is it really a problem with the 'T-word'? Or, is it actually a problem with how we explain it, such that we haven't found a way to overcome 'assimilation bias' in a way that doesn't cost us more than it saves? It's the latter methinks.

Jason Gorman does not advocate dropping the T-Word

Jason e-mailed me to clarify that he didn't state nor did he intend to give the impression that we should drop the 'T-Word'.

He asserts that he always uses "Test" in "Test Driven Development" and doesn't advocate the removal of it.

The point of his post was to lead people to understand some of his reasons for using the phrase 'test assurance' and not 'test coverage'.

I've updated the article to reflect this correction to my understanding of his position.

Nonetheless - I'm happy that he prompted me to write about the subject.

Antony Marcano

Is it really a problem with the 'T-word'?

Methinks very much so. There is a kind of developer (which sadly I'm very well acquainted with) that when presented with the verb "Test", it will immediately trigger the reaction "I'm not a bloody tester, I don't do that", with variable degree of politeness. I am not restricting the context here to TDD; I've seen it happen in different teams, specially test teams that have one or more test developers (usually for coding test tools or harnesses, but an integral part of the test team, at least in theory). As long as the test developers are coding, they are happy, but when faced with "having to test something", they'll try as hard as they can to avoid it (even their own tools). So much so, that I have purposely started using alternative expressions: instead of "testing the new tool", we now "ensure the quality of the tool". It gets the same end result ('cause they do test it) but with a deal less of cajoling required!

Cheers,

Marta

Comment viewing options

Select your preferred way to display the comments and click 'Save settings' to activate your changes.