views:

39

answers:

2

I've figured out how to run my tests from the commandline using:

java -jar fitnesse.jar -c MyFixturePage?test&format=text -d "c:/utils/fitnesse/" -r "FitNesseRoot"

Using this as the startup parameters for my Fixture assembly project in visual studio does not work. I'm using the Slim runner and executor in my fixtures : http://github.com/jediwhale/fitsharp/downloads

Has any one worked out how to get debugging with Slim working in Visual Studio?

+1  A: 

The problem is that java spawns another process where your .NET code gets executed and then that process shuts down right away. Here's a way to get a hold of the process where the .NET code runs:

http://www.asoftwarecraft.com/2010/01/troubleshooting-with-fitsharp-and.html

Mike Stockdale
Thank you Mike, perfect solution. Guess I should have read the manual :) http://www.syterra.com/Slim/DebuggingFixtures.html
Edward Wilde
A: 

Another good way is to simply introduce a assertion that launches the debugger. In our code all of our fixtures derive from some simple custom base fixtures with some utilities in them like |debug|

this assertion just launches the debugger like so:

 public void Debug()
    {
        System.Diagnostics.Debugger.Launch();
    }

as soon as the assertion is hit the debugger launches.

this has the advantage in that you can quickly pop it in wherever you like. Sometimes you might have a long test that uses the same assertions over and over, in which case this is nice because you can do it right before the one that's the problem.

ryber