36

What is the recommended practice? Should I add the my sub-folder under the fitnesse folder to version control?

Context: working on a single developer rails pet project. I've my rails project under version-control (Subversion) however my fitnesse wiki pages lie under the fitnesse program folder.

Fitnesse seems to have its own version-control... (I see numbered zips along with each of my wiki pages) Is it reliable? Where does it store the revisions?

4 Answers 4

32

Use the -d switch (which is surprisingly low profile on a google search)

Fitnesse20081201>run -p 8080 -d c:/projects/MyProjectNeedsAcceptanceTests

This will create a subfolder in the specified folder called FitnesseRoot if it doesn't already exist, with all the stuff it needs to run.

Fitnesse should be up. Switch to your browser. Go ahead and create your pages.

  • You will have a subfolder for every Fitnesse page you create.
  • Each folder would have a content.txt (which is the wiki content) and a properties.xml (which are the Fitnesse Properties for that page).
  • All subpages would be subfolders under the folder for the parent page.

Directories and Files...You're all setup for your first check-in to version control. Also set up your version control to ignore certain types of files

  • FitnesseRoot/files
  • FitnesseRoot/ErrorLog
  • *.zip

(The .zip files are how Fitnesse keeps track of edits to wiki pages.. a short term local version control. VCS like svn, git, cvs, etc.. should take care of this for us. So we don't need to check in the zip files)

Hope that made sense.. If not I suggest you take 15 mins off to listen to the following screencast from UncleBob himself
Source: Robert Martin - Version Control and Development Environment for Fitnesse

3
  • On windows 7, this fails due to the paths for many FitNesse files being to long. Anyway to install FitNesse locally and have it refer to the testing suite in a folder location not under FitNesseRoot?
    – Shire
    Mar 12, 2014 at 14:05
  • 1
    @Shire: I think what you're asking is possible. I've been able to separate the common FitNesse files from my project files. The common files, such as fitnesse-standalone.jar, are in one folder, C:\FitNesse\ . My project files are in their own folder which has 2 children: A batch file to start FitNesse and the FitNesseRoot folder. The batch file has one line: java.exe -jar C:\FitNesse\fitnesse-standalone.jar -p 8090. My top level page in the project FitNesseRoot folder defines the test runner path: !define TEST_RUNNER {C:\FitNesse\FitSharp\Runner.exe}
    – Simon Elms
    Aug 28, 2017 at 0:17
  • 1
    Further to my previous comment, environment variables are useful to avoid adding paths to source control. So the command in the batch file to start FitNesse can be: java.exe -jar %FITNESSE_HOME%\fitnesse-standalone.jar -p 8090 -e 0. The TEST_RUNNER can be defined as !define TEST_RUNNER {${FITSHARP_HOME}\Runner.exe}. FITNESSE_HOME is an environment variable pointing to FitNesse root, the folder containing fitnesse-standalone.jar (in my case C:\FitNesse). FITSHARP_HOME is an environment variable pointing to the FitSharp folder (in my case C:\FitNesse\FitSharp).
    – Simon Elms
    Aug 29, 2017 at 4:32
24

If you're using version control with Fitnesse, you won't need the zip archive for every revision. Use the -e 0 option to prevent the zip archives from being created:

java -jar fitnesse.jar -p 8001 -e 0

1
  • Thanks for this additional information! The zip files would totally bug me.
    – guerda
    Sep 9, 2011 at 13:25
3

FitNesse stores old revisions of every page in a zip file in the same directory as the page's files. The zip filename marks the timestamp of the revision. It works similar to wikipedia - history, but not full-fledged version control.

In our company we wanted a setup where whenever we checkout a (possibly old) revision of the source, we also check out FitNesse tests that pass for that specific version.

Therefore, we installed FitNesse (the fitnesse directory, including the FitNesse executable and the FitNesseRoot directory) inside our source tree in version control, setting a rule to not import *.zip within the FitNesseRoot directory (as we have version control to keep history for us and don't need them).

This works excellent with sane SCMs (I used svn w/ svn-tortoise).

When we moved to Microsoft Foundation Server source control we had many issues with the checkout-edit-checkin workflow. Then again, this workflow is simply a bad idea in general, and should only be used by insane control-freaks.

(edit: answered commenter's question)

2
2

Since the 20090214 release of Fitnesse, CM integration is included, see user guide for details. http://fitnesse.org/FitNesse.UserGuide.SourceCodeControl

The git hub plugin is included with the fitnesse distribution.

I see a plug in for perforce at http://code.google.com/p/perforcecmsystem/, but I haven't got this setup for my team yet.

1
  • 4
    Yeah, but the docs don't tell you how to use it. It just tells you how to configure it. Jan 16, 2010 at 3:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.