RSS RSS feed | Atom Atom feed

Using version control with FitNesse, revisited

I have written before about using subversion to provide source control for FitNesse tests, but we eventually abandoned that process because of difficulties with using the refactoring support built into FitNesse. We moved to a system where all edits to test pages were made on the shared FitNesse server, and if a developer needed to get those to their machine, they would use the wiki import feature. The problem was that we lost version control of the tests. Mike Roberts has also written about a system that is a little closer to what Jeffrey and I did.  

Here is another suggestion from Andrew McDonagh that was posted to the FitNesse users list. I've formatted his email and removed some of the location details.

We have always checked our FitNesse pages into source control....

This is how we do it....

The Shared Server
The FitNesse server for testing <our app> currently runs on http:/some.server. This server is a read only server and the wiki pages should not be updated here. The Acceptance Test pages on this server are automatically updated every few minutes from subversion.

Editing the FitNesse Wiki Pages
If you wish to edit the Acceptance Test pages, you need to install FitNesse locally on your machine. Please see the <our app> FitNesse Install instructions on how to do this (basically we have version controlled the download from fitnesse.org).

Setup
The next step will be to get the AcceptanceTest directory from subversion onto your local machine. To do this, use svn checkout from <subversion URL> to S:\AcceptanceTest. Under this directory is a file and a folder that are used for editing these pages.

S:\AcceptanceTest\FitServer.bat - this is a batch file that will start the fit server on your machine.
S:\AcceptanceTest\FitNesseRoot - this is the directory that contains all the files for the wiki pages.
Start the FitNesse server on your own machine by running the FitServer.bat file.

Local edits
To edit the pages on your machine, please use the fitnesse wiki interface provided. Connect to your machine and make the relevant changes. After you have finished your changes, and you will need to commit the changes for them to be visible to other users.

Saving changes back to the repository
Using TortoiseSVN, right-click on the S:\AcceptanceTest\FitNesseRoot directory and select SVN Commit. You will be presented with a log message window. In the bottom half of this window, there will be a list of 'unversioned' files. You need to right-click add these directories and files except for *.zip files. The ZIP files are the incremental revisions that the Wiki (it's own internal revision control system). For these ZIP files, after you have added the directory that they live in, you can use svn ignore to hide these files (right-click->TortoiseSVN->add to ignore list).

Running Tests-The Official Way
If you want to run the current suite of tests, please use the shared server.

As with our system, this will also have difficulties when you use the wiki refactoring tools (which are great to have). In this case, however, since each developer/tester is doing subversion commits manually (rather than the automatic commits on the server that we were doing in our system), people can note that certain files are missing and mark them as deleted in subversion, and add the new files as if they were brand new. Sounds like a pretty good setup.




Add a comment Send a TrackBack