Unit Testing with OCUnit
Subject:   Test Driven Development
Date:   2004-04-24 14:00:18
From:   dsteinberg

You need to consider the purpose of your tests. If they are intended just to test your code then your process is fine. But the reason it is called Test Driven Development is that the tests are what help specify the code you are writing. The tests really are driving the development and some people will not write any production code without a failing test.

Forget about TDD in its current incarnation and go back almost twenty years to the early days of Objective-C. Brad Cox explained in his classic book on OO that the way he discovers and shapes his objects is by considering client code. What are the needs of the code that will call into these objects? TDD starts there. You first write the client code and that points you in the direction of the object being crafted.

I don't understand why, if you are going to write a full set of tests anyway, you wait until you write a "large chunk of the application". A growing suite of unit tests lets you know that your application is compiling and has the correct behavior at all times.

1 to 1 of 1
  1. Test Driven Development doesn't *always* work
    2004-04-24 15:59:02  gaeldesign [View]

1 to 1 of 1