Initial thoughts on Fitnesse
Last night I started having a look at Fitnesse. For those who don't know what it is, it's a mix of both a Wiki and an Acceptance Testing framework. Fitnesse is not meant to be a unit testing tool like NUnit, nor a functional testing tool like TestComplete. Instead it aims to show that the software does what it was meant to.
A description of what the software should do is put on the wiki, including test scenarios (in tables). When a wiki page is written that includes tests a "Test" link becomes available and anyone can click on the link to execute the tests.
If the tests pass, the result columns of the test table(s) turns green. If it fails the result columns turn red and show both the expected and actual return values.
All good in theory but how does it actually work?
I decided to play with a simple VS2005 project and do something basic to acceptance test a simple business class (set a few property values and check the results).
Getting fitnesse running was a piece of cake, and then it took me about 5-10 minutes to setup a page for my tests. I then discovered that in order to test anything you need to create a test harness. Much in the same way that you create a test harness for unit testing in NUnit, you need to create a TestFixture for Fitnesse that inherits from one of the predefined fixture types. These fixtures are what are referenced by the test tables, and give meaning to the various column headings in the tables.
It didn't take long to knock one up, and then I tried to run the page. This is where it got confusing.
The Fitnesse documentation is somewhat, um, sparse if you are trying to test anything other than Java code. After a bit of hunting around I found that I needed to tell Fitnesse to use the .NET server (which makes sense).
However when I ran the tests it told me it couldn't find my assemblies. I scratched my head for a while before eventually realising that the .NET fit server uses the 1.1 framework and it won't know how to load 2.0 assemblies.
Unfortunately the binary distribution doesn't contain the .NET 2.0 version, so I had to go and download the source version. The source version for some reason includes the .NET 2.0 version of the fit server and when I ran with that everything worked as expected.
In summary, it looks like it will do a good job and fills a gap that NUnit doesn't cover. Also, the fact that you can use it as a documentation repository (eg tech specs/use cases with tests built in) is a boon. So now that I've gotten through the pain of setting it up in the first place it's time to try it out on something a bit more complex and realistic.
A description of what the software should do is put on the wiki, including test scenarios (in tables). When a wiki page is written that includes tests a "Test" link becomes available and anyone can click on the link to execute the tests.
If the tests pass, the result columns of the test table(s) turns green. If it fails the result columns turn red and show both the expected and actual return values.
All good in theory but how does it actually work?
I decided to play with a simple VS2005 project and do something basic to acceptance test a simple business class (set a few property values and check the results).
Getting fitnesse running was a piece of cake, and then it took me about 5-10 minutes to setup a page for my tests. I then discovered that in order to test anything you need to create a test harness. Much in the same way that you create a test harness for unit testing in NUnit, you need to create a TestFixture for Fitnesse that inherits from one of the predefined fixture types. These fixtures are what are referenced by the test tables, and give meaning to the various column headings in the tables.
It didn't take long to knock one up, and then I tried to run the page. This is where it got confusing.
The Fitnesse documentation is somewhat, um, sparse if you are trying to test anything other than Java code. After a bit of hunting around I found that I needed to tell Fitnesse to use the .NET server (which makes sense).
However when I ran the tests it told me it couldn't find my assemblies. I scratched my head for a while before eventually realising that the .NET fit server uses the 1.1 framework and it won't know how to load 2.0 assemblies.
Unfortunately the binary distribution doesn't contain the .NET 2.0 version, so I had to go and download the source version. The source version for some reason includes the .NET 2.0 version of the fit server and when I ran with that everything worked as expected.
In summary, it looks like it will do a good job and fills a gap that NUnit doesn't cover. Also, the fact that you can use it as a documentation repository (eg tech specs/use cases with tests built in) is a boon. So now that I've gotten through the pain of setting it up in the first place it's time to try it out on something a bit more complex and realistic.