Benefits of FIT tests for systems without a UI – level 200

Sam Gentile reminds us of the value of FIT when requirements might be vague _and_ complicated.  His team is using it to help the customer understand what they want.  His post reminded me of the value I’m already starting to take for granted.

My team is still early on in our FIT implementation.  We have a few components covered so far, but recently, we created a new service that runs all the time and does stuff.  Do you love the vague description?  It responds to a queue:  One component drops off some work, and it picks it up and does it’s thing.  We have this implemented as a Windows service, so it would be very difficult to test by manual means.  The tester would have no UI at all, and they would have to arrange for work to be dropped off, wait a bit and check that the work was completed. 

FIT enables a whole new dimension to testing this service.  Our tester has been creating his test cases even while we’ve been creating the FIT fixture for it.  We hashed out what the fixture would look like on the whiteboard, and then started.   We have our first draft of the FIT fixture working, and it’s a big eye-opener to be able to test a component (that has no UI) with a GUI.  These are automated tests as well (that’s FIT’s nature), and we’ll run them forevermore.  Once we have these tests passing, they will serve as a regression tests suite for this component.  When a bug arrises, we’ll create a FIT test to isolate the bug and then fix it. 

We’re using the FitNesse wiki to organize our FIT tests.  We’ve set up a special CC.Net build that detects wiki changes and commits those to Subversion.  Our CC.Net build for the component pushes the latest bits to the FitNesse wiki so the FIT tests are always run against the current build.  Read how we integrated FIT into our build here.  Read how we versioned the wiki here.  Mike Roberts has done something similar as well.
 
For this work, we’re using the newly-ported FitLibrary‘s DoFixture.  The DoFixture allows a very intuitive layout of the test.  For more information, I’d recommend reading the FIT book by Ward Cunningham and Rick Mugridge.