The ongoing search for simple solutions.

Tuesday 16 June 2009

Debugging FitNesse Fixtures within Visual Studio

I came across a great article from Jim Holmes on his blog "Frazzleddad".
In his post, he explains how to debug FitNesse fixtures within VisualStudio - which is great, because if a FitNesse test fails for unknown reasons, it can be painful to get to the root cause of the problem - and I currently write unit tests to test the fixture code independently of the tables. By introducing Fixture debugging, I can run my FitNesse tests directly from VisualStudio, and use breakpoints to find out what is happening inside the fixture code.

Setting this up is very simple. Folow these steps:-

  1. Open the Project Property page for the fixture.
  2. Select the Debug tab.
  3. Select the "Start external program" radio button, and enter the path to TestRunner.exe in it's field.
  4. In the "command line argumants" field, enter the host, port and page which relate to your FitNesse test (e.g. localhost 8081 EmailSystemTests.TestSendMail)
  5. Set the fixture project as the startup project.
  6. Add breakpoints and click Run(F5)
* First time I tried, VisualStudio complained about the TestRunner.exe.config file. I just renamed the file, and everything worked as expected.

Here is a screenshot of the VisualStudio Project Properties dialog (stolen from frazzleddad)


Original post - http://frazzleddad.blogspot.com/2008/01/debugging-fitnesse-tests.html

No comments:

Other Blogs