For anyone using FitNesse you may have the need (or just plain desire) to run your FitNesse tests from within your Team Build scripts. This is a need that we have on a project I’m currently working on so I investigated the various options for implementing the tests within our automated build process.
In the end, I ended up creating a custom build task that allows you to run FitNesse tests as part of your build. The build task currently supports FitNesse but will also support tsqlunit tests (another testing framework we use) in the near future.
I’ve placed the custom task on CodePlex here in case anyone else is interested in making use of it. You can download the installation file here if you’re not interested in the source code and just want to install the build task.
The build task works by running the FitNesse test just as you would through a browser – i.e. it makes a request to the specific test page’s (or suite’s) URL and parsing the resulting HTML to determine the outcome of the test(s). The advantage to this approach (rather than using the TestRunner.exe application) is that it does not require any FitNesse components to be installed on the build machine.