Trace: » dotnet
Using FitNesse to test .NET code
The FIT .NET integration was developed by David Chelimsky and Mike Stockdale; version 1.0 was released in late 2006. Current version is 1.5, released in February 2008. You can binary versions of FitNesse.NET test runner from SourceForge. There are some important specifics in the .NET test runner, especially with regards to symbol processing and cell handlers. See fit framework implementation differences for some basic .NET specifics.
For a quick introduction on using FitNesse for .NET testing, see Getting Fit with .NET. If you are interested in future FitNesse.NET plans and features, see Mike Stockdale's web site. For a more detailed guide on using FitNesse in the .NET world, including how stuff really works under the hood, see Test Driven .NET development with FitNesse.
Cory Foy wrote an article on how to connect from FitNesse to F#.
Namespaces
Leaving your fixture in the global namespace will allow Fitnesse to find it automatically. If the fixture is in a namespace, you have a few options:
- Fully qualify the fixture name in the table
- Create an Import table at the top of the page. Using an Import table is the equivalent of a “using” statement in C#. (See also FitnesseDevelopment.DotNet)
- Create a global import table. On the suite main page, you can add a page with the same name as the suite, but with a .Setup extension. Add the import table there and it will be imported by every test page in the suite.
Debugging
While you can do some tricks to debug an actual Fitnesse server, for the most part you will be interested in debugging fixtures you have written. The easiest way to do this is to keep a copy of the Fitnesse.Net source code on your machine. It is stored in a Subversion repository at this location:
https://fitnessedotnet.svn.sourceforge.net/svnroot/fitnessedotnet
Once you have downloaded and compiled the source code, you can debug your fixtures with the TestRunner. Set it as the startup project in Visual Studio, and set the command line arguments to point to a running Fitnesse server. The required arguments are the server IP, Port, and the page you wish to debug. So if you have a server running on the local machine, you might set the command line arguments to "127.0.0.1 8400 FrontPage.SuiteRegressionTests.TestDivision".
TestRunner supports other command line arguments. If you specify any, they need to come before the required arguments.
