Download presentation
Presentation is loading. Please wait.
Published bySolomon Simpson Modified over 9 years ago
1
FitNesse On the Road to Success By Pierre Veragen pierre.veragen@comcast.net
2
What we will cover today What is FitNesse? Quick introduction How it works Different types of tables Principles you can use
3
F ramework for I ntegrated T esting FitNesse, a wiki using Fitwiki Defining Acceptance Tests, checking that “We are building the right thing” Creating a feedback loop between customers, testers and programmers Provides a one-click test environment Fit / FitNesse
4
Now some Demos Simple Calculator Discount Calculator
5
How it works The text is interpreted so it can trigger the fixtures that call the System-Under-Test (SUT) Fit interprets the results and display Pass/Fail in each cell Proper syntax is key Not so hard to learn… …after you get going
6
Fixture Class Public Class CalculatorAsColFixture Inherits fit.ColumnFixture Public Number1 As Double Public Number2 As Double Private _oSUTCalculator As DemoSUT.SUTCalculator Public Sub New() _oSUTCalculator = New DemoSUT.SUTCalculator End Sub Public Function Product() As Double Return _oSUTCalculator.Multiply(Number1, Number2) End Function End Class System Under Test Public Class SUTCalculator Public Function Multiply( _ ByVal firstNumber As Double, _ ByVal secondNumber As Double) _ As Double Return firstNumber * secondNumber End Function End Class Table, Fit, and Fixture together Fixture and SUT working together The Actual Page
7
What we will cover today What is FitNesse? Quick introduction How it works Different types of tables Principles you can use
8
Different Types of Tables The most common: ColumnFixture, when a test case can be expressed in a row with input/outputs RowFixture, when checking a list DoFixture, when doing Actions alone Do, Column, and Row fixtures together And many more ActionFixture, an old and limited DoFixture > stay away from it
9
Examples - Testing Column-based, could not find one Do fixture as actions Do Fixture as test driver, our preferred way Do Fixture as test driver Let the fixture generate all the combinations Avoid these: A laundry list page Just tables, what is the purpose of the test? Just tables A page that does everything
10
Examples – Documentation A page as “Executable Requirement” A FitNesse page is a good way to hold current documentation, accessible by everyone
11
What we will cover today What is FitNesse? Quick introduction How it works Different types of tables Principles you can use
12
Principles, related to fixtures… Fixture should be as thin as possible No code duplication in fixture >>> all good coding practices apply Use business domain words for all public members displayed in pages >>> Ask the business people or let them drive.
13
Principles, related to pages Most maintenance is going to be on the pages not the fixtures, if well designed No table duplication >>> use the “!include” syntax to share a page among other pages Use business domain words Keep the page focused and simple
14
Some parallels Decouple components Avoid coupling tables to SUT code Avoid geeky talk and reflection Use domain driven architecture Use page structure driven by business domain This isolates pages from SUT refactoring Duplicate codeDuplicate tablesDuplication is more expensive in FitNesse Code being Tested FitNesseComments
15
How to get help FitNesse on the web http://fitnesse.org/ FitNesse on the web Yahoo Group http://groups.yahoo.com/group/fitnesse/ Yahoo Group Fit Web Site http://fit.c2.com/ Fit Web Site A great book “Fit for Developing Software” with its samples http://www.vlagsma.com/fitnesse/Fit for Developing Software http://www.vlagsma.com/fitnesse/ Ask others
16
Others have been busy Fixtures: http://fitnesse.org/UsefulFixtures Environments: http://benefit.sourceforge.net/ http://fitpro.sourceforge.net/ http://ase.cpsc.ucalgary.ca/ase/index.php/FitClipse /FitClipse http://ase.cpsc.ucalgary.ca/ase/index.php/FitClipse /FitClipse http://sourceforge.net/projects/profit
17
Some advice to get started Use a scout and get help Work as a Team Test pages should look simple and straight to the point Focus on expressing the intents (requirement) and the corresponding acceptance tests Accept the fact that you will refactor page structure and fixtures Better sooner than later
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.