A little getting started guide for fitness
Slim has several test written in table format.
We will use the decision table
|eg.Division|
|numerator|denominator|quotient?|
|10 |2 |5 |
|12.6 |3 |4.2 |
|100 |4 |33 |
where
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;
}
}
You can run a test with one of the following options:
When you are on a web page, you can start a run with:
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.
Doc: http://fitnesse.org/FitNesse.UserGuide.AdministeringFitNesse.RestfulServices
You can see in the output that the engine is slim
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.
echo %ERRORLEVEL%
1