TDD Survey Results

Tim Morton bio photo By Tim Morton

I gave a lightning talk at RubyNation called “TDD in the real world”, mostly as an excuse to poll the audience about testing practices. 

The most interesting question for me was - how many people follow the standard “red, green, refactor” cycle in their day to day development? I asked - who follows this pattern more than half the time? 70% of the time? 100% of the time? Results:

  • 50% - about half the audience.
  • 70% - ~40% of the audience (I’m in this category)
  • 100% - 5 and a half people, including Yehuda Katz

A lot of people are not doing strict TDD. This is the RubyNation conference, which had TATFT last year. This is the Ruby community, which has a ton of experimentation and a million test frameworks. Frankly, I’m kind of baffled. Are these people doing a lot of research-style code spikes? Are they writing tests after the code, but still getting decent test coverage? Or is testing just “exercise and vegetables” - things that people should be doing, but don’t?

More research is needed.