Mar 24 2008
Fixture Gallery
FitNesse resources
Test Driven .NET Development With FitNesse: A detailed guide on using FitNesse and TDD practices to build better .NET software
DbFit: Test-driven database development
Fixture Gallery: Straight-forward examples for the most common fixture types in .NET, Python and Java
FitNesse.Info: Links to other FitNesse related resources.
Getting Fit With .Net: Quick Introduction to Testing .Net Applications with FitNesse
Fixture Gallery is a cookbook for FIT/FitNesse tests. It provides developers with a quick overview of the most important fixture types and concepts for agile acceptance testing using the FIT framework. For each fixture type, this document explains the table format and fixture class structure and provides advice when to use and when not to use it. Each example is accompanied by the source code for Java, .NET and Python FIT implementations, in a form that can be easily copied and used as a template for similar fixtures.
Release 2.1 (2008-07-08) is available in three forms:
There is also a Portugese translation of release 2.1 (2008-08-11):
The source code for all the examples in Smalltalk, Python, .NET and Java is available from SourceForge. Get release 2.1 or browse the current development branch.
Intended audience
This document will be most useful to people who are already using FIT and FitNesse to some extent and know the basics, although experienced FIT/FitNesse users might also find a few new tricks here. This is not a good guide to help you get started with FIT or FitNesse. See Fitnesse.Info for a list of resources that will help you take that first step.
This is an open documentation effort — please contribute
My intention with the Fixture Gallery is to start an open documentation project where other people can contribute their notes and ideas about how best to use FIT/FitNesse fixtures. The source code for the document and all examples is hosted on SourceForge. Please help to make this document better either by directly changing it on SourceForge or by modifying the live wiki version on FitNesse.info.
Feedback
To leave comments or feedback, please use the form below.




Where can I find the version of the DoFixture that supports the following features…
Hi MUlmer,
the patches are now obsolete. nullable type support was built into the main branch of fitnesse.net a while ago. Regarding blanks and numeric comparisons, you can load support for that using the Cell Handler Loader table.. Here’s an example that enables symbols:
You can get objects from arguments using the GetArgumentInput method (see http://syterra.com/FixtureArguments.html).
[...] really found the FIT/Fitnesse documentation to be very good, maybe I didn’t look har enough. This fixturegallery looks like a good place to start and check when you have [...]
This is very good information. I would suggests adding information of the DomainAdapter idea in the latest FitLibrary and SuiteFixture. These work together well to allow you to have one fixture and talk more directly to domain objects.
I just heard about a Generic Fixture for FitNesse at http://genericfixture.wiki.sourceforge.net/.
It seems to have only a Java implementation currently.
Has anyone done similar work (or adapted that Generic Fixture) for use with FitNesse .NET?
Hi Kevin,
There is no equivalent of generic fixture for .NET as far as I know.
Kevin,
The DomainAdapter in FitLibrary allows something similar to the GenericFixture you mentioned. It does not completely remove the ability in most complex cases for some ‘fixture’ code but it greatly reduces it and does not require a tester to know class names. The DomainAdapter is available in both .Net and Java versions of FitLibrary. It also offers several ways to do conversion from the strings in the test to your domain objects.
[...] por Ivan Sanchez em Terça-feira, Julho 8, 2008 Como já escrevi há algum tempo atrás, a Fixture Gallery é uma das melhores referências sobre FIT/FitNesse que eu conheço. Então resolvi dar o pontapé [...]
I’m building an automatic acceptance test tool leveraging Fitnesse. Because of troubles in latest test suites, i decided to send you this message, hope that i could get a solution.
Our undertest application is a heavy GUI built in Java. To run it manually, we need a JVM with -Xms128M -Xmx256M. As we need to verify the business value via GUI, it ’s mandatory
to get the references of graphical widgets. To do that, i start the targeted application in method of a subclass of DoFixture
public class MyOwnDoFixture extends DoFixture{
public void startGUI(){
Runnable r=new Runnable(){
public void run(){
MyMainClassInJarArchive.main(new String[0]); // We need to invoke it in a thread, not process. To get referecences of graphical widgets, the runnable r and MyOwnDoFixture
// must be run in the same JVM
}
};
new Thread(r).start();
…….
}
public void traceAllComponents(){
…..
}
}
My wiki page contains following scripts
|MyOwnDoFixture|
|startGUI|
|traceAllComponents|
…..
This implementation worked well with lighter application ( the same undertest application, but some modules are disabled), which requires less than 64 M of Java heap to run
With the latest application, the graphical interface is partly frozen and crashed-prone.
I used JConsole to see what happened in backgroud. When I start the Fitneese server at the port 8288, a JVM is instantiated to run the main method of the class Fitnesse. When I clicked on the ‘Test’ button in my wiki page, a new JVM is instantiated ( its connection on JConsole is : …. FitServer 8288 1 ( the counter of clicks on Test button) ). The default java heap size of this JVM is always 64M, and i don’t know how to customize it. That cause a critical problem as the undertest app is run in a JVM with 64M of java heap.
I want to know if there is anyway to customize the java heap size of the last JVM ( what i need to put in config, what code snippet need to be amended )
Tests are executed in a separate process, starting fitserver. to pass arguments to that process, see http://fitnesse.org/FitNesse.CustomizingTestExecution
[...] por Ivan Sanchez em Segunda-feira, Agosto 11, 2008 Finalmente está no ar a versão pt_BR da FIT/FitNesse Fixture Galery. Ela está disponíveis em três [...]
Hi Gojko,
In the gallery the .NEt tests do not work out of the box. On the main page of the .NEt suite the classpath must change from ..\bin\*.dll to dotnet2\*.dll
When will C++ version of FIT be added to fitnesse?
Tomwang,
As far as I know, there is a C++ test runner that integrates with FitNesse already.
Gojko, would it be possible for you to add SLIM examples? In particular being able to download an executable Fitnesse wiki that demonstrates .NET support with SLIM would really be helpful.
Yep, i planned to do that… not high on my list of priorities, though. You can see my slim presentation for a few examples though.