This article describes a convenient way of debugging NUnit tests using open source plugin to Visual Studio 2008. Many open source and cross platform projects choose NUnit testing framework for mono and nant support.
Visual Nunit plugin for Visual Studio 2008 was developed to speed up development of MXP protocol reference implementation. Being able to debug unit tests easily from integrated development environment is a big efficiency factor.
- Download the latest release from here.
- Run the installer.
- Start Visual Studio 2008.
- Select from Menu View->Other Windows->NUnit View.
- Place the view to location of your choice.
The debugging with Visual Nunit is achieved by simply double clicking the test at NUnit View. To create test cases to your project, do the following steps:
- Download NUnit 2.5 from here.
- Add nunit.framework.dll to your projects references.
- Add test case to the project (See example below).
- Make sure your project dependencies have copy local properties set.
- Build the project.
- To start debugging, click the arrow button of a test row in the NUnit View.
- Proceed as normal with Visual Studio Debugging.
Stopping debug will terminate the nunit runner process if your unit test is hanging or if you do not wish to wait until it is completed.
public class ExampleTestFixture
public void TestSuccess()
public void TestException()
throw new Exception("Test Exception");
public void TestAssert()
public void TestHang()
Points of Interest
Visual Nunit was written with Microsoft Visual Studio 2008 SDK. The project type is Visual Studio Integration Package and the sources are available as open source project from here.
- 21st June 2009 - Initial version