FIT - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

FIT

Description:

Fitnesse: Wiki that uses the FIT Engine. Wiki: Shared Information, editable by anyone ... enter|name|Jango Fett| |press|register| |check|getStoredName|Jango Fett ... – PowerPoint PPT presentation

Number of Views:37
Avg rating:3.0/5.0
Slides: 27
Provided by: downloadM
Category:
Tags: fit | jango

less

Transcript and Presenter's Notes

Title: FIT


1
FIT
  • Framework for Integrated Testing
  • Roy Osherove
  • Sela Group
  • Royo_at_Sela.co.il

2
Why?
  • Acceptance tests by customers
  • Automation
  • Readability and Test Cases
  • Executable Requirements
  • Above Unit Tests

3
The FIT Framework
  • Customer Testing
  • Uses HTML Tables
  • Allows testing flows
  • Requires Adapter classes to execute the system
    under test

4
HTML Document (Tables)
FitRunner
Results (Xml, Html)
5
Specification Document
Text.
Html Table.
Text.
Text.
6
Mapping Test To Code
Class MyClassColumnFixture Public int
Num1 Public int Num2 Public int
Result() return new Calculator.Add(Num1,Num2)

7
Fit Engine
MyClassFixture
ProductionCode
ProductionCode
DB
8
From Fit to Fitnesse
  • Fit Testing Engine
  • Fitnesse Wiki that uses the FIT Engine
  • Wiki Shared Information, editable by anyone

9
Fitnesse
  • Manage HTML Tests and documentation
  • Requirements
  • Create Test Hierarchies
  • Built with Java
  • Runs .NET

10
  • Using Fitnesse as Wiki
  • (ColumnFixture)

11
Types of Fixtures
  • Column Fixture
  • RowFixture
  • ActionFixture
  • DoFixture

12
ColumnFixture
Class MyClassColumnFixture Public int
Num1 Public int Num2 Public int
Result() return new Calculator.Add(Num1,Num2)

13
RowFixture
public class ListActiveUsersfit.RowFixture
public override object Query() return
User.GetAll()
14
  • Creating a RowFixture

15
ActionFixture
public class RegistrationScriptfit.Fixture
public string name private CustomerDatabase cd
new CustomerDatabase() private int
customerId public void Register() customerIdcd.
Register(new Customer(name)) public bool
IsCheckPending() return cd.IsCheckPending(custome
rId) public bool IsApproved() return
cd.GetCustomer(customerId).approved public
string GetStoredName() return cd.GetCustomer(cust
omerId).name public void Approve() cd.Approve(
)
16
  • Creating n ActionFixture

17
Example ActionFixture in Fitnesse
!ActionFixture startNetFit.RegistrationScript
enternameJango Fett pressregister checkg
etStoredNameJango Fett checkisCheckPendingtru
e checkisApprovedfalse pressapprove check
isCheckPendingfalse checkisApprovedtrue
18
DoFixture
public class MyClassDoFixture Public int
LastSum Public void AddTo(int a, int
b) LastSum new Calculator.Add(a,b) Public
void SendMessageWithBodyAndSubjectTo(string
body, string subject,string to) MailMessage
mm .....
19
  • Creating a DoFixture

20
Types of Fixtures
  • Column Fixture Testing values easily
  • RowFixture Batch comparisons
  • ActionFixture Complex Scripts
  • DoFixture Your own test language

21
Test Hierarchies and flow
  • Wiki
  • SubWiki (Test Suite)
  • MyTestPage.Setup
  • MyTestPage (Test and text)
  • MyTestPage.TearDown

22
Installing Fitnesse
  • JRE 1.5
  • Unzip fitnesse to the server
  • Run run.bat (edit to include p port)
  • Go to server http//serverport
  • Create first test by going to
  • http//serverport/YourNewTestPage

23
Fitnesse Process
  • Create stories in fitnesse
  • Create examples (tests) in fitness
  • Dont run them
  • Create the code with TDD and unit tests
  • As the code is built, run the FIT examples

24
Resources
  • Official Java docs http//www.FitNesse.org
  • Fit Docs
  • http//fit.c2.com/
  • Fitnesse yahoo group
  • http//tech.groups.yahoo.com/group/fitnesse/
  • FitLibrary
  • http//fitlibrary.sourceforge.net/
  • FIT for developing software (book)

25
Questions?
  • Royo_at_Sela.co.il

26
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com