Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I setup FitNesse for use with .NET?

I'm trying to get started with FitNesse for .NET on Windows Vista. In all tutorials I find on the web I'm told to execute the run.bat file, but all i get when downloading the latest release is a .jar-file. When i run this, the filestructure is unpacked and I can reach the fitnesse server by browsing to http://localhost. Now, when I'm trying to set up a test project, according to all documentation I find I'm supposed define the path to fitsharp.dll but I can't find this file anywhere in the filestructure that was set up from the .jar-file. What am I doing wrong?

like image 253
Fredrik Avatar asked Dec 01 '09 21:12

Fredrik


People also ask

How do I set up FitNesse?

Installing FitNesse Below are the steps to install FitNesse: Download the most recent version from http://www.fitnesse.org/FrontPage.FitNesseDevelopment.DownLoad. Run “java -jar fitnesse.org”. FitNesse will extract itself and will try to run itself on port 80.

What is FitNesse testing tool?

FitNesse is a web server, a wiki and an automated testing tool for software. It is based on Ward Cunningham's Framework for Integrated Test and is designed to support acceptance testing rather than unit testing in that it facilitates detailed readable description of system function.

How do I create a test page in FitNesse?

Step 1: Create a static page in FitNesse and write the script for all the test pages mentioned before as shown below. Click on the Save button to commit changes on FitNesse page. Step 2: Now write the test script for each new FitNesse test page in a similar way we did in the last tutorial for Calculator System.


2 Answers

Download FitNesse jar from http://fitnesse.org/.

Run

java -jar fitnesse.jar 

It will start web server and create folder FitNesseRoot with wiki contents. To check that it has started navigate to http://localhost - you should see FitNesse front page.

Edit front page - just add something like HelloWorldTest (must be camel case!) in the bottom and save. Click on the appeared question mark and save a new page. Click Properties and make sure Page type is Test.

Download FitSharp from https://github.com/jediwhale/fitsharp and extract it to folder fitsharp next to your FitNesseRoot.

Create .Net project for tests, add references to fit.dll and fitSharp.dll located in just created fitsharp folder.

Write a simple test in .Net and compile it. For example use a simple column fixture as described on http://fitnesse.org/FitNesse.UserGuide.FixtureGallery.BasicFitFixtures.ColumnFixture. Add test table to our HelloWorldTest page.

On top of your FitNesse test page (in our example HelloWorldTest) enter:

!define COMMAND_PATTERN {%m -r fitnesse.fitserver.FitServer,fitsharp\fit.dll %p} !define TEST_RUNNER {fitsharp\Runner.exe} !path <path to your test assembly> 

If you click on Test button and see no results then try to use TEST_RUNNER RunnerW.exe for troubleshooting.

Here's a great book on using FitNesse with .Net: http://fitnesse.s3.amazonaws.com/tdd_net_with_fitnesse.pdf

like image 66
Konstantin Spirin Avatar answered Oct 07 '22 15:10

Konstantin Spirin


Checkout this free ebook: Test Driven .NET Development With FitNesse: Second Edition

It will show you everything you need, from how to set up FitNesse with FitSharp, to best practices.

You'll need to get the FitSharp dll from http://github.com/jediwhale/fitsharp/downloads.

like image 34
Charles Avatar answered Oct 07 '22 14:10

Charles