John Lockhart, WebTest Limited STANZ Wellington August 2010 Practical demonstration of FitNesse,...

Preview:

Citation preview

John Lockhart, WebTest LimitedSTANZ Wellington August 2010

Practical demonstration of FitNesse, FitLibrary and

FitLibraryWeb

➲Enough of FitNesse, FitLibrary and FitLibraryWeb to enable you to use it on real projects.➲The demo is itself created as an "excecutable specification" in Fitnesse, to demonstrate the use of automated tests as documentation.➲This slide format means links and tests will not work. I suggest you follow the steps to install and run this talk locally.

Overview

➲1. Background and intro including how to install and run the suite and its objectives.➲2. Building of a suite of tests specifying FitLibrary using FitLibraryWeb. This approach has the advantage of not requiring internet connectivity or anything except the tools themselves to be installed to run the demo.➲3. Questions/Discussion?

Format

➲'Fit' was invented by Ward Cunningham in 2002➲to allow people to collaboratively express tests at a business level of abstraction➲, in the form of html tables➲and have those tests execute via specialised java classes (fixtures) which provide a mapping to the tested application.➲Ward also invented the Wiki, and + Fit = Fitnesse.➲This gave simplified table markup history subwikis/suites turning Fit from a batch style tool to a simple but effective testing framework.➲Initially these tests were basically data driven.

Background

➲Rick Mugridge created FitLibrary which enhanced FitNesse in many ways e.g.:➲1. Keyword-driven testing for scenario tests

➲2. Defined actions for abstractions/macros within the wiki

➲3. Plain text format

➲FitLibraryWeb added built-in fixtures e.g. web GUI + services testing➲Rick, an Aucklander, co-wrote the first Fitnesse book with Ward. ++Good. (Gojko Adzic has also written a couple of good books – the older .Net focussed one now free).

Development up to present

➲Steps (you must have java 1.6+ installed first):–1. Download zip from http://bit.ly/bbuhIf and extract–2. Double-click on run.bat file in the folder–3. Open http://localhost:8980 to see home page, which you can edit e.g. Put in links to your own suites or to pages like:–http://localhost:8980/FitLibraryWeb.SpiderFixture.SpiderTutorial

For Rick's great tutorial–http://localhost:8980/StanzDemo for this talk and demo suite.–Optionally install TortoiseSVN to give you version control then you can right click on that StanzDemo folder and choose update to get latest version.–For latest versions and instruction see link from webtest.co.nz/blog

Install and Setup

The Demo Suite

The final two defined actions

Now the test in plain text form

Next page has results....

Defined Action Format

The modified action and DD equiv:

Jmeter for Load/Perf testing

➲Combine with a continuous build tool such as Hudson or Cruise Control so can run unattended or automatically and in parallel➲Which provide scheduling, automated running for new versions, and better management of test result history,➲And a version control systems such as Subversion or Git (though FitNesse also has its own)➲To provide a pretty complete testing solution.➲See Rick’s tutorial for tools that are useful with SpiderFixture

Recommendation

Recommended