FIT Testing 2 December 7, 2004
FIT Specify tests in HTML tables Use fixtures to parse tables and execute tests Available for multiple languages http://fit.c2.com See also FIT chapter in Required Readings on blackboard for more information Tutorial on FIT with Eclipse link in External Links section on blackboard
Fixtures 3 standards Can make others Action Fixture Column Fixture Row Fixture Can make others First row of table specifies what fixture to use to parse the table
Action Fixture First column of table contains keyword for action Subsequent columns contain parameters Entire table is treated as one test Default keywords Start – instantiate a class Enter – call a method with a parameter Press – call a method with no parameters Check – compare method’s return value with an expected value http://fit.c2.com/wiki.cgi?ActionFixture
Column Fixture Columns of table map to public fields and methods Each row is treated as separate test Row executed left to right Putting () in column name indicates method to check return value from http://fit.c2.com/wiki.cgi?ColumnFixture
Row Fixture Each row is a data item Data items can appear in any order http://fit.c2.com/wiki.cgi?RowFixture
FITnesse Standalone wiki that’s hooked to FIT Allows group to easily edit test files without worrying about ensuring the correct versions propagate out to all locations http://fitnesse.org