Fitnesse building the right code
Sponsored Links
This presentation is the property of its rightful owner.
1 / 23

FitNesse Building the right code PowerPoint PPT Presentation

  • Uploaded on
  • Presentation posted in: General

FitNesse Building the right code. Trond Arve Wasskog – JavaZone’05 14.09.2005. Version 1.0. Who am I?. What is this talk about?. Waiting at the sphincter muscle…. May. Jul. Sep. Nov. Analysis. Design. ?. Implementation. Test. Source: Uncle Bob.

Download Presentation

FitNesse Building the right code

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

Fitnesse building the right code

FitNesseBuilding the right code

Trond Arve Wasskog – JavaZone’05


Version 1.0

Who am i

Who am I?

What is this talk about

What is this talk about?

Waiting at the sphincter muscle…










Source: Uncle Bob

Acceptance tests and the agile rhythm

Acceptance tests and the agile rhythm

Running, tested features

















Fit and fitnesse


Framework for Integrated Test

Created by Ward Cunningham

Coordinated by Jim Shore


FIT in a Wiki

Created by Uncle Bob (ObjectMentor)

Maintained by Micah Martin

FIT and FitNesse

Acceptance tests

Acceptance Test

Input Data

Expected Result

Acceptance Tests

User Story

Let s create a calculator

Let’s create a calculator!

Test table styles and fixtures

Test table styles and Fixtures

  • Query

    • Business rules

    • ColumnFixture (Fixturous Logicus)

  • List

    • Test lists of values

    • RowFixture (Fixturous Recordus)

  • Workflow

    • Interaction

    • Possibly stateful

    • ActionFixture (Fixturous Interactous)

DEMO: <Alt>-<Tab>

Fitlibrary rick mugridge

FitLibrary – Rick Mugridge

  • Fixtures for actions (workflow):

    • DoFixture

    • SequenceFixture (mostly the same as DoFixture)

  • Fixtures for lists:

    • ArrayFixture - ordered lists

    • SetFixture - unordered lists

    • SubsetFixture for parts of unordered lists

    • ParamRowFixture to simplify the use of RowFixture with other FitLibrary fixtures

  • Fixture for calculations:

    • CalculateFixture

  • Fixture for set up:

    • SetUpFixture

Project examples

Project examples

  • http://localhost/JavaZone.ProjectExamples

Include fitnesse in test and ci cycle

Include FitNesse in test and CI cycle!

  • Reduce the feedback loop

  • Developers must pay attention to acceptance tests

Structure and configuration

Structure and configuration

Latest version of application and database

Stable application and database

FitNesse Root

Stable Config

Developer Config

All Tests

Approved Tests

Suite of all approved tests run in CI cycle

Root of all FitNesse tests

Feature 1 Suite

Feature 1 Test 1

Feature 1 Test 2

Feature 2 Suite


Test Suite

Feature 2 Test 1


Feature 2 Test 2



Development environment

Development Environment

Running fitnesse from the command line

Running FitNesse from the command line

  • CommandLineRunner

    • Ant

    • Debugging

  • Maven plugin

  • Note

    • Using client classpath

    • ... but server FitNesse server test tables

    • ... and variables defined on the server

A word about gui webui testing

A word about GUI/WebUI testing...

  • Don’t do it!

    • Hard to understand and maintain

    • Brittle

    • Slow

    • Hard to test-drive

  • If you really must...

    • FitNesse

      • JWebFit - JWebUnit

      • HtmlFixture – HtmlUnit

    • Canoo WebTest

    • Selenium

    • Watir

  • Test as much as possible on the backside

What is this really about

What is this really about?

  • Communication, Feedback and Collaboration

  • Customer involvement

  • Specification instead of Verification

  • Building the right code

  • Agile development

    • Running, tested features

    • Delivering business value

    • Iterations

    • Know when you are done

    • Measuring progress and velocity

    • Regression testing

C est tout

C’est tout

Thank you very much for listening to me!


Now get out and start writing FitNesse acceptance tests!

Feel free to contact me:


Hints tips

Hints & Tips

  • FitNesse - Excel

  • Refactoring FitNesse

  • !path

    • Use / (forward-slash)

    • No Spaces in paths

  • System properties

  • Version control

    • Built-in

    • File system



  • Fit for Developing Software – Rick Mugridge/Ward Cunningham


  • FIT


  • FitNesse



  • FitLibrary



Developer tips

Developer tips

  • Database tests

    • Start a transaction in a DoFixture setup

    • Perform the required database setup

    • Execute the tests

    • Roll back the transaction

  • Mocks and stubs

    • Use mocks and stubs to focus coherent tests

  • Transactions and mocking is easy using Spring



  • TypeAdapters support domain types in tests

    • String to domain objects

    • Domain objects to Strings

    • Test for equality

  • Built-in type adapters for primitives and wrappers

  • Three ways to add TypeAdapters

    • Add a public Object parse(String s, Class type) in your Fixture

    • Add a public static <Type> parse(String s) in your domain object

      • Uses toString() and equals()

      • FitNesse only

    • LibraryTypeAdapter.registerParseDelegate( Class type, Object parseDelegate)

      • FitLibrary Fixtures only

  • New plugin architecture underway

Fit vs fitnesse

FIT vs FitNesse

  • FIT runs HTML tables

    • Must be run from the command line

  • FitNesse is more dynamic

    • Easy to specify and execute tests

    • Wiki

    • Widgets

    • Symbolic Links

    • Must copy and paste from Excel

Fitnesse architecture

FitNesse Architecture

  • Login