VistaDB 5
Gibraltar VistaDB > Developer's Guide > How To Perform Common Tasks > Running VistaDB Unit Tests > Running VistaDB Unit Tests - Debugging with NUnit
Running VistaDB Unit Tests - Debugging with NUnit

Since all NUnit assemblies are just DLL's the only thing you need to debug an Nunit test is the debug setting to launch an external process (see Running NUnit tests for more information).

Start debugging in Visual Studio like normal, but set it to start an external program in the debugging tab. For the application you will normally use c:\program files\NUnit 2.x.x\bin\nunit.exe - this is the GUI runner for Nunit tests. There is a console test runner as well for automating test runs through an automated process.

You should also pass the DLL you are running as a command line parameter. The current versions of NUnit are better about loading the DLL from the current working directory, but it never hurts to set this option as well.

Set breakpoints, check off the tests in NUnit (or run them all) and when your breakpoint is hit you debug like any other application. This comes in incredibly useful for debugging complex unit tests.

View the options in the NUnit sample project properties.

Note the (x86) should on be present on machines running 64 bit OS's. Navigate to the installation path for your NUnit and use this directory.

See Also