Menu

How to set up FitnesseTFS with FitNesse

Help
Lars-Erik
2011-01-04
2013-09-25
  • Lars-Erik

    Lars-Erik - 2011-01-04

    The first release is a bit simple, but it works. :)

    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\bi-lea\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
    pause

    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 Plugin 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 {Plugin.fitnesseTeamSystem C:\Users\me\Documents\Fitnesse\ "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\"}

    When the page is saved 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.

    Enjoy! :)

     
  • Lars-Erik

    Lars-Erik - 2011-01-04

    Changed plugin name and added the nooutput option.
    Variable declaration should now look something like this:
    !define CM_SYSTEM {fitnesseTfs.SourceControlPlugin C:\Users\me\Documents\Fitnesse\ "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\" nooutput}

    Remove nooutput to see output from tf in the console window running fitnesse.

     
  • Lars-Erik

    Lars-Erik - 2011-01-05

    If you install fitnesse to %userprofile%\documents\fitnesse like I did, and multiple users should be able to check in, use %userprofile% instead of c:\users\me like in the example.
    Hope to fix this in a coming release. :)

     
  • Anonymous

    Anonymous - 2011-01-24

    Hi,

    thank you for ur work. But i cant get the plugin workin. The fitnesseServer doesnt find the jar-file and so im getting these exceptions:

    Could not invoke static cmUpdate(path,payload) of fitnesseTfs.SourceControlPlugin
    java.lang.ClassNotFoundException: fitnesseTfs.SourceControlPlugin

    I created a "Plugin" folder beside the fitnesse.jar und put the fitnessetfs.jar in there. Reading you instructions many times word by word doesnt tell me more than "it should be the correct" may be there have to be a path variable set or define a using to make it working.

    I hope you can help me.

     
  • Lars-Erik

    Lars-Erik - 2011-01-24

    Hi, Rico!
    Might it be that you don't start java in the Fitnesse folder?
    In the bat file I use I change the current directory to the folder I've got Fitnesse in like this:
    @echo off
    cd %USERPROFILE%\Documents\Fitnesse\
    java -jar fitnesse.jar -p 8080 -e 0

     
  • Anonymous

    Anonymous - 2011-01-24

    Im not sure, because we have one "root" folder und in it there are 4 other folders.

    -"bin" here is the fitnesse.jar in
    -"FitNesseRoot" here are the pages in
    -Fixtures
    -log

    i created in the bin folder a new folder called "Plugin" and put the file in. I already tryed to copy the file everywhere around these folders but nothing happend…

    thx a lot for your support

     
  • Anonymous

    Anonymous - 2011-01-25

    Hi Lars,

    today a got it nearly workin. Now i have a diffent problem. The path building by fitnesse with the parameter from the CM_system define und something else ist wrong… the is a dot in it so that the tf.exe cannt work with it.

    Now is the question where the second part of the path is comin from? Is it a config file?

    thx + greetings from bamberg

     
  • Anonymous

    Anonymous - 2011-01-26

    Today i got it totaly working!
    Thx for this great plugin!

    PS: please correct your install tutorial, the folder for the plugin should be named "plugins".

     
  • Ehsan Bouhendi

    Ehsan Bouhendi - 2013-09-25

    Hi Lars,

    I have followed the instruction you are given to setup the plugin. I have the same problem, I have added both Plugins and plugin folder beside "fitnesse-standalone.jar" (This is what I have rather than fitnesse.jar in latest version of fitnesse I downloaded).

    I even tried to run fitnesse with classpath to the FitnesseTfs.jar file. It does not do anything.

    Even I don't get any error. Is there any way that I can figure out if fitnesse finds the plugin. For example a log?

    Thanks

     

Log in to post a comment.