Release 0.8 is a major release which contains a number of new features and fixtures, as well as several bug fixes. It is looking forward to the 2.0 FIT specification.
This feature was actually in Release 0.7, however it has been significantly improved and extended.
FIT works best when the translation between cells in a table and the object used by the application is handled by a class that is a normal part of the application, not by code specifically written for the test itself.
The Type Adapter mechanism accepts simple Value Objects as their own type adapters. Ward Cunningham's Checks pattern language for input validation contains an excellent discussion of design philosophy.
There is a new mechanism for application wide configuration. This mechanism supports, among other things,
It will also be the vehicle for FIT Specification 2.0 compliance and will allow an application to enable and disable specific Python FIT extension features.
This release contains rudementary support for writing FIT tests in languages other than English, and in having the results in the native language. This support is not complete; in particular not all messages are available for translation, and several of the standard type adapters are not customizable.
Most of the support is centralized in the new Application Configuration module, although there are pieces in several other places, including the label to identifier translation mechanism and the fixture name mechanism.
The new Application Configuration exit now makes it possible to provide a central directory which maps business facing fixture names to the correct file, module and class that provides the fixture.
This feature works for all fixture names, regardless of whether they are in a classic FIT context or a FitLibrary context.
The process of translating a label to a Python language identifier has been improved. In particular, it is now possible to choose one of the three camel routines on an application-wide basis, it is possible to provide an application-wide vocabulary (an Ubiquitous Language), and it is possible to have this application-wide vocabulary in a language other than English.
It is now possible to create a list of tests to run. This list can contain runner parameters for the run as a whole as well as specific parameters for each test. It can also contain a fixture rename list, although the Application Configuration mechanism serves this purpose better.
The tests in the list need not be in the same directory.
This feature only applies to the batch runners in this release. Support in the FitNesse TestRunner is a future objective.
The runners now support diagnostic parameters, which will cause the FIT core to put out additional information at various points.
It is now possible, using the Application Configuration module, to maintain a central directory of all type adapters for an application, and to refer to them by name in a fixture, rather than having to import them and refer to the class objects. This feature works identically in basic FIT and in the FIT Library.
This is a prototype application object which shows how to use a graphic visualization library in FIT. There's an example on p.84 of the Fit Book.
It is now possible to leave out metadata in some circumstances, if authorized by the Application Configuration Exit. This facility is very rough in this release, it may be improved in subsequent releases if usage warrents. See the Type Adapter description for more information.
All fixtures can now override the setUpFixture(firstRow) method at the beginning of processing, and the tearDownFixture() method at the end. This is still an experimental feature and may not be present in all contexts. It should work as expected for all classic fixtures, however it will not work the way one expects in the DoFixture environment.
It's now possible to specify the column types in a ColumnFixture or RowFixture subclass without using markup on the labels. This is, of course, optional; the previous markup still works.
There are also several new column types in Column Fixtures and Row Fixtures.
All of the list fixtures (ArrayFixture, RowFixture, SetFixture and SubsetFixture) can now be used directly in a classic context without having to write a subclass. They all take the same input variations; RowFixture no longer needs ParamRowFixture as an adapter.
It is now possible to put a comment column in a CalculateFixture.
CommentFixture no longer marks the cells in the table as ignored.
This fixture, from the latest FitLibrary release, allows one to test combinations of two parameters in a tabular format.
This fixture, from the latest FitLibrary release, is a variation on CalculateFixture where the method being invoked returns a boolean True or False. Each table has either True or False as the expected result, which means that it does not have to specified on each row.
This fixture, described on pages 83 and 84 of the FIT Book, provides a two dimensional array of named images. It was part of the original Fit Library distribution which wasn't originally converted.
This fixture, from FitNesse, was documented on pages 81 and 82 of the FIT Book. The implementation is somewhat different. The acceptance test includes three different fixtures, including one that uses it in a setup role, and two that show the difference between doing your own validation and using the type adapter mechanism.
The Default type adapter implements the type inference facility that allows leaving metadata out. See the Type Adapter writeup for more information.
This type adapter provides the contents of the parse node's .body attribute without the editing of the .text() method. It's a new part of the FIT Library.
As usual with type adapters, we strongly recommend writing an application specific adapter using the RawString protocol, which provides the same service to any adapter which requests it.
The float type adapter has been enhanced with a new explicit epsilon option, improvements to the range option, and the ability to selectively enable and disable the major check options.
The epsilon option is: "float +/- float". The range option is "float op _ op float", where op can be any of <, <=, > or >=. The single character mathematical symbol for +/-, <= and >= are also accepted. The range option also allows open ranges, that is: "float op _" or "_ op float".
Any of the three options for checking a floating point number can be turned off, either on an application wide basis or on an identifier by identifier basis. Turning off the range option in the float adapter does not turn off the numeric range cell handler; this has to be disabled independently. See the float type adapter documentation for details.
This type adapter handles the URL in an "<img src'...'>" tag. It's part of the Image Fixture, but can be used independently.