Posts tagged as 'TDD'

Test the interface, not the implementation

In yesterday’s post, I mentioned that unit tests should test the interface and not the implementation. This is the simplest example I could think of to demonstrate this…

Why write the unit tests first?

At work today, a colleague and I did a presentation to the rest of the team on Test Driven Development. At BrightTALK we’ve been using unit tests for some of our code for a few months now, but it’s been very much a case of writing tests after writing the code. Often, it’s just after (write the code, then write the test) but still, the code came first. A couple of months ago I persuaded the Flash/Flex team to try writing the tests first. They found it difficult for the first few days, but rapidly got up to speed and are now very enthusiastic about writing tests first. So we hosted this presentation/discussion with the whole team, Actionscript, PHP and Java developers, to discuss Test Driven Development. One thing I really wanted to convey to them were the benefits of writing the test first. These are the five main benefits as I see them…