1.2. Introduction to FitNesse

FitNesse is an framework to enable scenario testing. It builds upon the earlier FIT framework, which executes tests expressed in terms of tables. FitNesse sits on top of FIT[1], allowing the tables to be written within a Wiki, and spawning off FIT to run the tests. The results of the tests are shown as annotated tests, as shown below.

This makes it easy for non-technical business users to both author new tests, and to view their execution. It also creates an efficient feedback loop; a FitNesse test will "keep on going" even if it hits a failure. Thus the developer can identify several issues and fix them in a single pass.

Another way to think of FitNesse is as a replacement presentation layer, hitting the underlying domain model in the same way that the regular UI would.

If using FitNesse on a "regular" project then the developer writes glue code that in effect take the values out of the wiki page, and use them to interact with the system. They then return a success/failure response which FitNesse then uses to annotate the results page. FitNesse calls this glue code a "fixture". There is some overlap with Naked Objects' own use of that term. However, whereas a Naked Objects fixture is only used to setup the initial state of a test, a FitNesse fixture not only does that but it also is used to execute the test proper.

It is relatively straightforward to integrate FitNesse into a continuous integration environment; see Section 3.9, “Set up Continuous Integration” for further details.



[1] In fact, FitNesse as of end 2008 has a replacement test execution architecture, called SLIM.