02 febrero 2009

We are all doing TDD!

What? That is right! You are doing Test Driven Design and Development without realizing it. And you are really good at it. However, you are not doing it all the time and that is the problem. Here are some examples:

  • Test Driven Development: A test script fails. It turns out that the developer and the tester interpreted the requirements differently. But the test script is right, so you change the code to match the test script.
  • Test Driven Design: A tester is writing a test script and realizes that a salient requirement is missing. So you go back and update the design and change the code.
The problem is that these examples usually happen late in the development cycle, and often too late. And they happen a lot, virtually every time you find a bug or write a script.

The solution is obvious. You hear it every time you read an article on agile and test driven approaches.
  1. Write your test scripts first.
  2. Don't do all the test scripts and then throw them over the wall.
  3. Instead, do very short cycles inside your iterations.
The trick is to realize that you already do it and just need to start doing it sooner.

No hay comentarios: