Using Band XI's FitNesse Plugin for Eclipse 3
Our friends at Band XI have an Eclipse plugin for FitNesse. I spent a few hours trying it out for a client. Here are some notes to help you use it.
Band XI’s plugin makes it easy to run FitNesse from within Eclipse and to edit the Java code and FitNesse pages in one place. Hence, no more switching between windows while you’re making your acceptance tests pass.
The download and installation page describes how to get started. While it only lists support for Eclipse 3.1 and 3.2, it seems to work fine in Eclipse 3.3 and 3.4 M7.
After you have installed the plugin, you will have two new toolbar buttons, one to start and stop a local FitNesse server and one to start and stop a remote server.
You configure where these servers are located in the Preferences > FitNesse page. These settings apply for the whole workspace. It might be nice to be able to configure them on a project by project basis, but that’s not supported (and maybe not that important, either).
You also get a new project option in the “New” wizard. Java > FitNesse > FitNesse Example Project creates a new Java project with src, FitNesseRoot and fixtures source directories. The include all the standard example acceptance tests and code that comes with the FitNesse download.
I encountered a little oddity the first time I started the local server by clicking the toolbar button. The usual front page, with links for the examples, manual, etc. weren’t shown on the FitNesse front page.
I determined that this happens because the default FitNesseRoot in the preferences is ”.”. Instead, start the server the first time by right-clicking on the FitNesseRoot folder, then select the FitNesse menu and the Launch FitNesse runtime on this root folder option. From then on, it will launch with this folder as the default, until you select a different one.
Using your own FitNesse installation and projects
Here’s what I did to work with existing projects and use a separate FitNesse installation outside of an Eclipse project.
If you have another project with the FitNesseRoot folder, you can use it as just described (i.e., using the context menu).
Otherwise, go to the Preferences > FitNesse page and paste the full path of your alternative FitNesseRoot in the “local root directory” field. Be sure to delete the ”.” value that is present by default and also watch for spaces before and after the string. It appears that they aren’t removed, causing mysterious behavior…
To build fixtures in your Java project, add the FIT_LIB and FITNESSE_LIB “variables” (defined by the plugin) to the Java build path for your project (using the project properties dialog). The default values of these environment variables should be fine unless you are running a different version of FIT or FitNesse in your separate installation (in which case you can change the values as needed).
Finally, set your class path in your FitNesse pages to point to the correct directory for the compiled classes. For example,
!path /home/me/projects/workspace/MyFitProject/bin
That should do it!

Couple of issues I’m having with this are being conter productive to having this plug-in the first place!
I assumed the reason for this plug in was to bring your FitNesse tests under version control and all the lovely benefits of having an IDE. Thing is, there’s no option to disable FitNesse’s own version control system anywhere! I assume that the plug-in instantiates the server directly, there seems to be all the libraries present in the plug-ins folder and all you are required to supply is a FitNesseRoot. I need to be able to change the arguments.
We (University of Bonn) created a version of the plug-in that disables FitNesse’s own version control. It’s simple once you find the place to pass the additional command line parameter. If there is more interest, we will contact Band XI to upload it. Unfortunately conFit doesn’t work very reliable with Eclipse Ganymede, so there would be more work to do… No promises about that. Contact me, if you need our version.
Hence, no more switching between windows while you’re making your acceptance tests pass.