Fitnesse - Getting Started


A little getting started guide for fitness



BasicTest with a DecisionTable

Slim has several test written in table format.

We will use the decision table

|10       |2          |5        |
|12.6     |3          |4.2      |
|100      |4          |33       |


  • eg specifies a Java package (or other language namespace), and Division specifies the actual class to be called.
  • the rows are processed from left to right,
  • the input values are headers without a question mark ?
  • the input values are passed to the corresponding fields using setter functions
  • the expected value are the header with a question mark (ie quotient?)

This decision table would test this Java class:

public class Division {
  private double numerator, denominator;
  public void setNumerator(double numerator) {
    this.numerator = numerator;
  public void setDenominator(double denominator) {
    this.denominator = denominator;
  public double quotient() {
    return numerator/denominator;

Test Run

You can run a test with one of the following options:

Web Page

When you are on a web page, you can start a run with:

  • the Test button at the top of the page.
  • shortcut ALT-t from a web page

Http request

Http request example: http://localhost/FitNesse.UserGuide.TwoMinuteExample?test&format=text

Starting Test System: slim:fitnesse.slim.SlimService.
F 11:43:36 R:5    W:1    I:0    E:0    TwoMinuteExample	(FitNesse.UserGuide.TwoMinuteExample)	0.307 seconds
1 Tests,	1 Failures	0.719 seconds.


You can see in the output that the engine is slim

Command line

Command line example:

java -jar fitnesse-standalone.jar -c "MyTestPage?test&format=text"

REM Example
java -jar fitnesse-standalone.jar -c "FitNesse.UserGuide.TwoMinuteExample?test&format=text"
Starting Test System: slim:fitnesse.slim.SlimService.
F 14:38:15 R:5    W:1    I:0    E:0    TwoMinuteExample (FitNesse.UserGuide.TwoMinuteExample)   0.470 seconds
1 Tests,        1 Failures      1.152 seconds.


Powered by ComboStrap