Kategorien
TestTools

FitNesse & FitSharp: Some troubleshooting (1)

Debugging FitSharp FitNesse tests

I´ve worked a lot with FitNesse & FitSharp during the last months in several software projects. Until lately it has always been a big pain to solve any problems when no tests have been executed at all when you clicked the „Test“ button in FitNesse or when tests have been executed via commandline, e.g. within the automated build. Most of the times it was more or less guessing in the wild, changing something here, adapting something there, until the tests ran again.

Luckily I stumbled upon a possibility to debug your FitSharp tests easily while searching for a solution to another problem: In your definition of the test runner within the FitNesse wiki tests you usually do something like !define TEST_RUNNER {dotnet2\Runner.exe}. But there is another runner executable which is intended to be used for debugging and troubleshooting, just change the definition to the following: !define TEST_RUNNER {dotnet2\RunnerW.exe}. When you now execute a test, a seperate window opens:

What is visible here, are all the arguments that have been passed to the RunnerW.exe
Test execution has not yet started, now is the right point in time to attach your debugger; to start test execution, just click the „Go“-button.

In case of any unhandled exception, you see the result in the FitSharp window:

When done, click „Go“ again, and the window disappears.

Another possibility to achieve the same behaviour is to append ?responder=test&remote_debug=true the URI of the FitNesse page which you want to debug.

Via: A Software Craft

2 Antworten auf „FitNesse & FitSharp: Some troubleshooting (1)“

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.