Delphi FIT


Written by Salim Nair: Salim@chaaya.com
Updated to FIT20070619 and extended by Michal Wojcik: mgwojcik@gmail.com

Downloads:

Project moved to http://code.google.com/p/fit4delphi/

News group:

http://tech.groups.yahoo.com/group/fitnesse/

Comments:

This is almost complete implementation of FIT for Delphi. It supports Fixture, ColumnFixture, RowFixture and ActionFixture. Only decorators are not implemented.

Usage:

Set your COMMAND_PATTERN variable to point to FitServer.exe something like this:
!define COMMAND_PATTERN {c:\Source\fit4delphi\bin\FitServer.exe -v %p}
The %p represents a search path. .FitNesse will generate the search path for you. However you will need to use the !path widget identify necessary path elements. Path elements should be directory paths where .bpl files are contained. The .bpl files are dynamically loaded by FitServer to find the your Fixtures and execute them.

When creating test tables for use by the Delphi FitServer, identify Fixtures by supplying the name of the .bpl file followed by a dot, followed by the name of your Fixture class. In the example below, the Fixture is identified by FixtureLib.ExampleFixture. FitServer will search through the supplied path elements looking for the file FixtureLib.bpl. When found it will be loaded and searched for a Fixture named ExampleFixture or TExampleFixture (to easier use in Delphi world). ExampleFixture be loaded and an instance will be created to handle the rest of the table.

FixtureLib.ExampleFixture
...
...

Also note that reflection in this implementation of FIT is done through properties and dynamic call to methods. Therefore every column in your ColumnFixtures tables should have a corresponding published property and methods in the Fixture code.





Working Example


Updated By .AndrewMcDonagh

The necessary Fixture code for the example included within the DelphiFit Server.

NOTE: The paths being used expect the Delphi fitserver to be installed within the FitNesse directory.

For example, C:\FitNesse\DelphiFit\

If that is not the case, then the exact paths will need to be used.

Copy & paste the following into your own test page


!path c:\Source\fit4delphi\bin\*.bpl
!define COMMAND_PATTERN {c:\Source\fit4delphi\bin\FitServer.exe -v %p}


|AddFixture                    |
|firstValue|secondValue|resultant()|
|1         |2          |3          |
|2         |2          |5          |
|3000      |2          |3002       |
|200       |2          |203        |
|10        |2          |12         |








Known issues: