How to debug Fitnesse Codes in Visual Studio

Fitnesse is a great tool, a fully integrated standalone wiki, and acceptance testing framework and we used this on BlastSuites projects development. During test codes/scripts creation we may encounter runtime errors that are very hard to determine/check unless we use the Visual Studio debug.
Below are the sample acceptance test pages using Fitnesse and C# code and steps how to debug test codes.
Figure 1: Fitnesse Acceptance Test Page

And here are the steps to debug acceptance that while running in Fitnesse Server.
- Make sure that the test runner is RunnerW.exe
-
When you run the test a fitsharp dialog box will appear as shown below

-
While this dialog is still open go to your Visual Studio and attached the Fitsharp process. After attaching, the Visual Studio will start in debug mode so you can now put your breakpoints and start debugging to acceptance test codes.


-
After attaching, make sure you press the Go button in fitsharp dialog to continue the test

-
And that’s it, the debugging now is working

Conclusion:
Developer uses test (acceptance or unit test) to check if the code is working and not buggy, but sometime the test itself has a flaw and needs to debug. The above steps are very helpful if you want to debug the Fitnesse Acceptance Test.
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.