Ward Cunningham and Brian Ingerson: The FIT Framework


I was going to attend Ayesha╩Malik's (Object Machines) talk on Best Practices for XML Schemas, but Ayesha didn't show. As an alternative, I decided on Ward Cunningham's talk on Framework for Integrated Tests of fit. I'm glad I did.

Fit, is a methodology for creating tests for software modules that uses an HTML front end and a simple table format for creating tests. An automated backend uses these HTML pages to drive the code and report success or failure. The benefit to this is that business people or customers can define and read the tests according to what they think the proper function should be. With some coaxing and some samples, the customer can define the test cases.

Fixture is then defined to read the rows and columns that the customer thinks is important. Column fixtures are for logic, action fixtures are for interaction (buttons on the rows) and row fixtures are for databases. Fixtures are responsible for type conversion. Ward actually develops code in the fixtures (where its easily changed) and then transfers it to the right place when its mostly right. Of course, the fixture then calls the code in the right place and tests that.

Implementations are available in Java, C++, Delphi, Perl, Python, Ruby, CLOS, Scheme, and Smalltalk. There's a Ant integration project called AntFit.

Brian Ingerson has taken over and it talking about how fit can be used in open source projects. Brian has implemented a Fit modules for Perl called Test::FIT. Brian puts Fit tests for YAML (a data serialization module Brian developed) on a Wiki so that anyone can add tests. That's a neat idea. Brian runs a kwiki (that's not a typo) in every module directory and uses Fit tests for documentation and notes. Brian's module integrates the Fit methodology with the standard Perl module testing framework.

Brian has started FreePAN, a CPAN-like module directory for open languages. The vision is that the same modules would be implemented in each lanaguage and Fit would serve as the specification language.