Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is edit-triggered testing the next step?

I have just read Michael C. Feathers great book Working Effectively with Legacy Code, the bible of introducing tests to legacy code. In this book he describes something called Edit-triggered testing:

If it isn't out by the time this book is released, I suspect that someone will soon develop an IDE that allows you to specify a set of tests that will run at every keystroke. It would be an incredible way of closing the feedback loop.

It has to happen. It just seems inevitable. There are already IDEs that check syntax on each keystroke and change the color of code when there are erros. Edit-triggered testing is the next step.

When I read this I hadn't heard about any IDEs or tools that support this. However, I just found a project called Infinitest that supports this for Java.

My questions are:

  1. Are there any other tools/framework that support this (hopefully also for Visual Studio)?
  2. What are your experiences with this kind of testing (efficient, slows down the IDE, etc)?
  3. Is this the next step of TDD?

Updates:

  • Take a look a look at this screencast to see Infinitest in action for Eclipse.
  • Just found a blog where Brett Schuchert shares some experiences with Infinitest.
like image 200
BengtBe Avatar asked Jun 19 '09 08:06

BengtBe


1 Answers

There's Autotest for ruby. It continuously runs unit tests as you edit files, using some simple conventions to map source files to test files. There's also a plugin for it I've seen that colors the test code red or green in emacs interactively. I think this idea of immediate visual feedback of passing/failing in the code editor itself is great.

like image 101
Jason Watkins Avatar answered Oct 07 '22 00:10

Jason Watkins