|
|
FitNesse is a
Wiki built on top of Fit
framework which is used for
automating Acceptance test
cases. FitNesse enables
customers, testers and
programmers to learn what
their software should do,
and to automatically compare
that to what it actually
does do. In very simple
terms, it compares
customer's expectations to
actual results. This tool is
built on top of FIT
framework. Fit and
FitNesse, both believe that
great software requires
collaboration and
communication. These tools
enhance the collaboration
between customer, testers
and programmers by providing
a single platform for
communication. FitNesse can
be seen as a software
testing tool, a WIKI or a
web server.
|
Why FitNesse is needed?
In the absence of tool like
FitNesse, requirements are
mostly specified in natural
language. These requirements
are also supported by UI
mockups, charts etc. But
because it is in Natural
language, there are always
chances of ambiguity in the
requirement specification.
Another problem with normal
development is absence of
feedback on the feature
being built. FitNesse is a
combination of natural
language requirement and
executable acceptance tests.
This is sufficient to
describe requirements
completely, precisely, and
deterministically. FitNesse
gives capability to automate
the acceptance tests and
thus fixes the broken
requirement process.It should be understood that
purpose of FitNesse is to fix
the broken requirement
process by enhancing
collaboration and enabling
deterministic executable
automated tests. It can be
argued that why FitNesse is
needed for test driven
development methodology
where everything is anyway
driven by tests or unit
tests. Using unit testing,
usually programmers make
sure that their design is
sound and there is no
defect, but they do not
necessarily give information
on whether feature itself is
being built according to
customer expectation or not.
Advantages
There are many advantages of
using FitNesse and most
important of them is automated
acceptance tests using FitNesse. FitNesse enables early
feedback by providing
mechanism to execute
automated acceptance tests
as often as required. Tests
written in the FitNesse are
deterministic, i.e they
either run green or red.
Most importantly, test data
in FitNesse is developed
either by the customers or
by development or quality team with the help
of customer representative.
Since this data is developed
from the user stories and is
specified in a deterministic
manner, it ensures that
expectation from the system
is clear to everyone.
How it is implemented??
Tables are the crux of
FitNesse. Acceptance tests
in FitNesse are defined in the tabular
format. This deterministic
tabular format is understood
by the Fit library. These tests
or tables are defined in
terms of input and expected
output data. For example, if
you have to write FitNesse
acceptance test case for
shopping cart you might have
input as some item and you
can check number of items in
the shopping cart is
increased by one. In order
to read those table and test
your application under test
with the data used in these
tables, you need to write
Fixture Code. You can imagine
that Fixture Code is a bridge
between the table and
application under test. It
understands the language of
table and use this
information to exercise the
functionality of
application. There are
different type of table
styles and corresponding
fixture styles to suite your
application need. These
tables are created on the FitNesse test pages. If you
want to execute more than
one test pages, you can
combine them in the test
suite.
You can specify that
page is a suite page by
changing its page properties. You can also use
setup and teardown on test pages to
make sure that test
environment is setup
properly before starting the
test suite execution and
environment is cleaned after
it is finished. As
everything else, setup and
teardown is also implemented
as tables. Tests created
in FitNesse can be executed
from command line as well.
There are many benefits of
doing that. For example, you
can debug them easily, you
can include these in your
build script, it removes the
prerequisite of starting web
server to execute tests and
it can generate output in
HTML or XML format.
To execute FitNesse from
command line, you need to
use TestRunner utility. This
utility can be invoked using java
fitnesse.runner.TestRunner
[options] host port
page-name [options] can be used to
store results, format
results, running specific
tests etc.
This TestRunner offers three
different formats for
output. HTML, XML and a
plain text format called
Result format. Result format
is an intermediate format
used to store the data while
the test is executing. These
results typically goes in
the temporary file and after
the execution submitted to
the FitNesse for formatting.
More
On FitNesse>>>
|