FitNesse. GettingStarted.
CreateExampleAcceptanceTest [add child]

A step by step example to create an run a simple acceptance test.

  1. Edit the FrontPage[?] and add the link ^ExampleAcceptanceTest.  Click save.
    • You should see ^ExampleAcceptanceTest? appear on the screen.
  2. Click on the ? to open the page.
    • This will open an edit window on the page FrontPage.ExampleAcceptanceTest.
  3. Add the following to the page:
    • |myFixtures.rightTriangle|
    • |a|b|c|right()|
    • |3|4|5|true|
    • |6|8|10|true|
    • |3|5|9|false|
    • ----
    • ClassPath
      • and hit save.
      • beware: if you copy and past the lines above, be sure to remove any white space at the end of the rows. FitNesse will otherwise not be able to parse the rows.
  4. Click on properties.
    • click the test check box
    • hit save.
  5. Click on the ? after ClassPath
    • Add the following to the ClassPath page:
      • !path fitnesse.jar
      • !path FitNesseRoot/files/examples
        • and hit save.
  6. Click on [.FrontPage] and then on ^ExampleAcceptanceTest to get back to the test page.
  7. Create the following java program:
    • package myFixtures;
    • import fit.ColumnFixture;
    • public class rightTriangle extends ColumnFixture
    • {
    •   public double a;
    •   public double b;
    •   public double c;
    •   public boolean right()
    •   {
    •     return (a*a+b*b)==(c*c);
    •   }
    • }
  8. Save this program in root/FitNesseRoot/files/examples/myFixtures
  9. Compile this program.
    • You can do this by going to the root/FitNesseRoot/files/examples directory and typing the following command:
      • javac -classpath ../../../fitnesse.jar myFixtures/
    • Or perhaps you have a better way...
  10. Hit the test button on the ExampleAcceptanceTest screen.  
    • The cells in the right() column should all turn green.