AcceptanceTestsWithFitNesse.
TestingWithFitNesse
Test Results
Assertions: 110 right, 0 wrong, 0 ignored, 0 exceptions
< Under the Hood | New Requirements >

This is only the HTML version of the original WiKi-based tutorial.
You should download it from here to experience the real thing.

 Settings

Testing with FitNesse

Works quite well with FIT, what do I need FitNesse for? One thing is that not everybody likes editing a HTML document; and saving a Word document as HTML does not always provide a usable result. And if the customer likes to run FIT tests itself, she has to cope with the FITRunner command line tool.

Here comes FitNesse into play. FitNesse is a Wiki with its own Web-Server and a built-in FITRunner. You are currently using a FitNesse Wiki. The syntax is quite easy, at least a lot easier than HTML (click the Edit button on the left and have a look). And you can run a test very easily, just by clicking the Test button. Not all customers like Wikis (even if it is becoming popular thanks to projects like WikiPedia). But FitNesse also provides the possibility to import tables from Word and Excel using Copy/Paste.

But enough big words here, let's face the real thing and run a test from our example. Click the Test button. Now!

Subtraction of mandatory breaks

This test checks if mandatory breaks are subtracted.

de.fitsample.timerecording.TimeRecordingColumnFixture
day from to working time?
1 6:00 8:00 2.0
2 6:00 9:00 3.0
3 6:00 10:00 4.0
4 6:00 11:00 5.0
5 6:00 12:00 6.0
6 6:00 12:01 6.0
7 6:00 12:30 6.0
8 6:00 12:31 6.02
9 6:00 13:00 6.5
10 6:00 14:00 7.5
11 6:00 15:00 8.5
12 6:00 15:30 9.0
13 6:00 15:31 9.0
14 6:00 15:45 9.0
15 6:00 15:46 9.02
16 6:00 16:00 9.25
17 6:00 16:45 10.0
18 6:00 16:46 10.02
19 6:00 17:00 10.25
20 6:00 18:00 11.25



Taken break shorter than mandatory

If the employee has taken a break shorter than mandatory, then the difference is subtracted from the working time.

de.fitsample.timerecording.TimeRecordingColumnFixture
day from to recorded time? recorded break? mandatory break? working time? sum?
1 10:00 12:00 2.0 0 0 2 2
  1 12:15 17:00 6.75 0.25 0.5 6.5 6.5
2 08:00 12:00 4.0 0 0 4 10.5
  2 12:15 18:30 10.25 0.25 0.75 9.75 16.25
3 08:00 12:00 4.0 0 0 4 20.25
  3 12:15 19:30 11.25 0.25 0.75 10.75 27.00


Taken break equals mandatory

If the employee has taken a break that equals the mandatory break, nothing is subtracted.

de.fitsample.timerecording.TimeRecordingColumnFixture
day from to recorded time? recorded break? mandatory break? working time? sum?
1 10:00 12:00 2.0 0.0 0.0 2 2
  1 12:30 17:00 6.5 0.5 0.5 6.5 6.5
2 08:00 12:00 4.0 0.0 0.0 4 10.5
  2 12:45 18:30 9.75 0.75 0.75 9.75 16.25
3 08:00 12:00 4.0 0.0 0.0 4 20.25
  3 12:45 19:30 10.75 0.75 0.75 10.75 27.00


Taken break longer than mandatory

If the break taken by the employee is longer than mandatory, nothing is subtracted.

de.fitsample.timerecording.TimeRecordingColumnFixture
day from to recorded time? recorded break? mandatory break? working time? sum?
1 10:00 12:00 2.0 0.0 0.0 2 2
  1 12:45 17:00 6.25 0.75 0.25 6.25 6.25
2 08:00 12:00 4.0 0.0 0.0 4 10.25
  2 13:00 18:30 9.5 1.0 0.5 9.5 15.75
3 08:00 12:00 4.0 0.0 0.0 4 19.75
  3 13:00 19:30 10.5 1.0 0.75 10.5 26.25


< Under the Hood | New Requirements >


[.FrontPage] [.RecentChanges]