Get FitnesseTFS at SourceForge.net. Fast, secure and Free Open Source software downloads TFS Source Control Plugin for FitNesse


This is a source control plugin for FitNesse and Microsoft Team System.
Download binaries or source from the SourceForge repository.
Don't hesitate to use the forums if you get stuck. :)

To use the plugin, follow these instructions:

The plugin only checks out and in files, it doesn't get any new versions, since fitnesse doesn't call a relevant function.
I start fitnesse using a batch file, hence I can use tf.exe to get all files before fitnesse starts.
Here's a sample batch file:

 @echo off  
 cd C:\Users\me\Documents\Fitnesse\  
 "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\tf.exe" get c:\users\me\documents\fitnesse\fitnesseroot\myproject /noprompt /all /overwrite /force /recursive  
 "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\tf.exe" get c:\users\me\documents\fitnesse\fitnesseroot\myotherproject /noprompt /all /overwrite /force /recursive  
 start iexplore http://localhost:8080  
 java -jar fitnesse.jar -p 8080 -e 0
 pause    

Notice the -e 0 parameter to the fitnesse start command. It stops fitnesse from creating zip files. Though disabling the builtin rollback feature, you can now use Team Explorer to view history.

To map myproject and myotherproject to a source control folder under the relevant projects, you have to use the workfold command manually.
For instance you can start fitnesse without getting the files from source control, create a main page for a project, and then map the folder under FitnesseRoot to a new source control folder:

tf workfold $/MyTFSProject/FitnesseDocs c:/users/me/documents/fitnesse/fitnesseroot/myproject    

Before starting fitnesse, put the FitnesseTFS.jar file in a folder called Plugins beside fitnesse.jar.
On the main page for myproject define the CM_SYSTEM variable as Plugin.fitnesseTeamSystem with the fitnesse root path and the folder where tf.exe is installed:

!define CM_SYSTEM {fitnesseTfs.SourceControlPlugin C:\Users\me\Documents\Fitnesse\ "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\"}    

When the page is saved the next time, it should be added to TFS at the folder you created with the workfold command, and subsequently be checked in and out. Further pages added under myproject will be added to source control.

The plugin will output actions and output from tf to the console window running FitNesse. To stop it from outputting, add "nooutput" (without quotes) to the CM_SYSTEM variable.

!define CM_SYSTEM {fitnesseTfs.SourceControlPlugin C:\Users\me\Documents\Fitnesse\ "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\" nooutput} 

Enjoy! :)