Debugging Unit Tests

From OpenSimulator

Revision as of 10:04, 3 January 2009 by Gerhard (Talk | contribs)

Jump to: navigation, search

Debugging unit tests is useful for both test driven development and resolving build failures.

Debugging Unit Tests with Visual Studio

1) Download and install NUnit which includes NUnit GUI.

2) Start NUnit GUI

3) Enable Visual Studio Support from Tools->Options-IDE Support->Visual Studio

4) Open project and choose the test dll you want from OpenSim/bin directory (for example OpenSim.Data.MySQL.Tests.dll)

5) Open your OpenSim solution to Visual Studio.

6) Attach NUnit GUI process to Visual Studio by choosing Debug -> Attach to Process.

7) Set break points in visual studio.

8) Execute unit tests from NUnit GUI and Visual Studio should let you debug at the chosen break points.


Note: This seems to be an option for the Professional Editions of Visual Studio. The Express Edition (the free one) seems to have no Debug->Attach to Process option.

Debugging using TestDriven.net

OpenSim comes with a "testing" file that mentions a tool name "TestDriven.net". It looks good when you visit the page (http://www.testdriven.net) and there is a lot of positive feedback about it.

Anybody who has experience with it: please write a bit about it here.

Unfortunately it is a plugin and it seems that Microsoft removed support for plugins from Visual Studio 2008 Express (the free edition). So if you are working with this (like I) TestDriven.net unfortunately isn't an option.

Personal tools
General
About This Wiki