How do I setup FitNesse for use with .NET?
Asked Answered
C

7

25

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?

Cromer answered 1/12, 2009 at 21:4 Comment(0)
B
26

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

Berth answered 9/2, 2011 at 20:28 Comment(2)
I spent hours trying to get this working. The trick seems to be putting the FitSharp directory NEXT TO the FitNesseRoot directory. NOTE: I had FitSharp under FitNesseRoot, but fitsharp\Runner.exe was FileNotFound, so I tried supplying an abolute path, that was FileNotFound coz the path 'C:\Programs\FitNesse\FitNesseRoot\FitSharp\RunnerW.exe' was being TRUNCATED. Arrrggghhh!Tarpon
Important note: download packages by using NuGet instead of direct downloading to have runner libraries up to date. So, right-click on the Visual Studio projects, Nuget Packages, type in the search box "FitNesse". You will see the list of all packages available.Slifka
S
11

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.

Segno answered 7/12, 2009 at 21:39 Comment(0)
E
5

The .NET code is no longer bundled with FitNesse and is available here: http://github.com/jediwhale/fitsharp/downloads

Here's some information to get you started: http://fitsharp.github.com

Erlina answered 2/12, 2009 at 3:11 Comment(0)
U
2

Goto your http://localhost/root (special page for FitNesse) and paste this in there:

variable defined: COMMAND_PATTERN=%m -r fitnesse.fitserver.FitServer,dotnet2\fit.dll %p
variable defined: TEST_RUNNER=dotnet2\Runner.exe
variable defined: PATH_SEPARATOR=;
classpath: dotnet2\*.dll

Unzip the FitSharp binaries into a folder called dotnet2 under the folder you unpacked FitNesse.

FitSharp also includes DbFit for MSSQL & Oracle testing.

Uxorial answered 30/4, 2010 at 15:6 Comment(0)
E
1

I wrote this article:

http://www.programgood.net/2009/10/21/TestDrivenDevelopmentInNETCustomerTestsTheWebServiceUsingFitnesseCh7.aspx

This may help..let me know how you go.

Cheers

Extravascular answered 1/12, 2009 at 22:1 Comment(0)
F
0

If you haven't unpacked the .jar file, you need to run: java -jar fitnesse.jar. If you got that far, then follow jediwhale's very good tutorial. Here's a second, similar, tutorial, too: http://schuchert.wikispaces.com/FitNesse.Tutorials.CSharp.Slim.EachTable

Foretell answered 2/12, 2009 at 3:29 Comment(0)
S
0

I wrote step-by-step guide here: https://github.com/imanushin/NetRunner/wiki/Net-Runner-tutorial

Short idea: 1. Install FitNesse (just copy it to the any directory) 2. Start FitNesse 3. Use NuGet (!) to retrieve one of the packages (NetRunner or FitSharp, any of them) 4. Write functions needed in the Visual Studio 5. Write functions calls in the FitNesse opened

Fill free to ask more questions on the wiki page above.

Slifka answered 29/7, 2014 at 7:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.