Having said that the defintion of the requirements must be independent of the technical solution used to implement it.
This sample page shows that the same requirement defintion can be implemented once with a java class implementing the decision table protokoll and once with a senario.
The requirements are defined in a decision table on a sub page.
The first implementation used is the Devision class from the eg library.
import |
eg |
Included page: >CalculatorRequirements (edit)
Division | ||
numerator | denominator | quotient? |
10 | 2 | 5.0 |
12.6 | 3 | 4.2 |
22 | 7 | ~=3.14 |
9 | 3 | <5 |
11 | 2 | 4<_<6 |
100 | 4 | $R1= |
$R1 | 5 | 5.0 |
Now we define a second technical solution using a FitNesse scenario
scenario | Division _ _ _ | numerator, denominator, quotient? |
setNumerator | @numerator | |
setDenominator | @denominator | |
$quotient= | quotient |
Generate an instance of the class used by the scenario:
Library |
eg.Division |
We retest the requirements and get the same results.
Included page: >CalculatorRequirements (edit)
Division | ||
numerator | denominator | quotient? |
10 | 2 | 5.0 |
12.6 | 3 | 4.2 |
22 | 7 | ~=3.14 |
9 | 3 | <5 |
11 | 2 | 4<_<6 |
100 | 4 | $R1= |
$R1 | 5 | 5.0 |