Saved by Fitnesse

08 Feb, 2011
Xebia Background Header Wave

We’ve been busy for a couple of weeks now refactoring a fairly complex code base of just under 500 classes. None of us really knew all the details about this part of the system, but we didn’t let that stop us of course. After some regrouping/-shuffling/-factoring/*ing, the whole thing built OK and all unit tests were green again. All that was left to do was fix the Fitnesse tests. I remember thinking this should be easy since we had all those green unit test.
Evil laughter sounds.

We rely heavily on Fitnesse because it allows us to write specifications for our code in a way that is executable as well as understandable for others. You can even finish test cases before the coding is done so the tests work as part of the definition of done for a user story during a Sprint. The tests helped us to understand what the code was supposed to do, on a much higher level of abstraction than a unit test. This made it easier to find out what should be happening and fix the errors that were introduced by our refactoring. Because the Fitnesse tests make about 20,000 assertions we’re pretty confident the code still does what it did before.

Jan Vermeir
Developing software and infrastructure in teams, doing whatever it takes to get stable, safe and efficient systems in production.

Get in touch with us to learn more about the subject and related solutions

Explore related posts