In addition to Uncle Bob's intro and video, Brett Schuchert has written up an excellent article on Mike Stockdale's .NET implementation of Slim (as well as an example Slim implementation).
As with Fitnesse, Slim can be set up to run as a service.
Setting up Slim and Fitnesse
- Download the latest Fitnesse release.
- Download the latest slim release.
Configure slim as the test runner.
!*****> System-wide settings
!define TEST_SYSTEM {slim}
!define TEST_RUNNER {..\nslim\build\Debug\Runner.exe}
!define COMMAND_PATTERN {%m -r fitnesse.slim.Runner,..\nslim\build\Debug\fitnesse.dll %p}
******!
Running Fitnesse as a service
Get the Windows Resource Kit.
Install the Windows 2003 Resource Kit. You will only need the instsrv.exe and srvany.exe programs. So you can copy those out and deinstall the kit if you don't want it around.
Use the instsrv.exe program to install the srvany.exe program by using it like this from the command-line:
instsrv.exe FitNesse "[path]\srvany.exe"
Run the regedit.exe program to set the last parameters.
Find the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\FitNesse
Create a subkey with the name Parameters
In the parameters key, create a string value called Application and set its value to the full path of the java.exe file. For me it was:
C:\Program Files\Java\jre6\bin\java.exe.Create another string value called AppDirectory and set its value to the path where you want the executable to run. The directory where your FitNesse files are located : c:\Program Files\FitNesse
Create a last string value called AppParameters containing the parameters passed to the java executable above : -cp fitnesse.jar -Xrs fitnesse.FitNesse -p 8080
Open the service control panel and start the service.
A few observations that may make your implementation smoother:
- Although instsrv supports passing credentials, I don't advise it. On some machines, it didn't seem to set up the correct rights for the service account. Just add the account on the Log On tab of the service.
- For errors that you may encounter, see this article
I hope you find these instructions helpful. Happy testing.
-David