2008/02/09

TDD cycle length

In theory, a Test Driven Development cycle constists of the following steps:
  • Write a new failing test
  • Run the test and see it fail
  • Code (in order to pass the test)
  • Run the test again and see it pass
  • Refactor
In literature the time for one TDD cycle is stated to be about a couple of minutes.

I was wondering how my personal cycle time is at an average. So I wrote a little plug-in for Eclipse that listens to test runs and computes the average time between a test run with failures and a test run without any failures.

Here is what the very simple plug-in looks like:













In case you want to give it a try you can download it here.
The plug-in contributes a view called TddMeter. In order to show it simply hit <CTRL>-<3> and type TddMeter.

Note: The plug-in requires Eclipse 3.3

Update: The plug-in now persists its state.

3 comments:

Anonymous said...

really a nice plugin. Would be cool if the plugin persists its state so it does not get lost when I restart eclipse...

testdrivenguy said...

Thanks for your feedback. The plug-in now persists its state.

mhaller said...

i've been running it for a while, my current stats are:

Test runs: 1197
Test cases executed: 38580
Successful tests: 36088 (93%)
Avg TDD cycle time: 63m 48s