AcceptanceTestsWithFitNesse.
TestingWithFit
< The Problem Domain | Under The Hood >

This is only the HTML version of the original WiKi-based tutorial.
You should download it from here to experience the real thing.


So how do we test with FIT? Well, at first we need an HTML document with appropriate test data.
For our time booking example we prepared the following document:

http://files/FitTutorial/FitSample/acctest/TimeRecording.html

We would like to test our system with this document using FIT. There is more than one way to use FIT; let's start with the command line tool.

FIT Command Line Tool

The command line tool is not an .exe file or something like that, but the Java class FileRunner which you have to call with the path of the HTML document and the result document as parameters. Of course you have to put the fit.jar and all other needed classes on the classpath. Let's do it by example:


You should see something like this:



As output we get 20 right, 0 wrong, 0 ignored, 0 exceptions. Sounds good. And what about the result document? Let's have a look:
http://files/FitTutorial/FitSample/acctest/result/TimeRecording.html
Quite green, very nice. So that was our first FIT test.

FIT Eclipse PlugIn

Of course there is an Eclipse plugin, you can find it at:
http://fitrunner.sourceforge.net
For our next test we install the plugin and import (File/Import.../Existing Project into Workspace) the example project
   C:\develop\fitnesse\FitNesseRoot\files\FitTutorial\FitSample
After that we have to create a new Run-Configuration (Run/Run...):



Now when we press Run we get the following output in the Eclipse console:



So the output is similar to that of the command line tool. And the result document is also the same:
http://files/FitTutorial/FitSample/acctest/result/TimeRecording.html

< The Problem Domain | Under The Hood >


[.FrontPage] [.RecentChanges]