VistaDB 5
Gibraltar VistaDB > Getting Started > Sample Projects included with VistaDB > Running VistaDB Unit Tests -Running NUnit Tests
Running VistaDB Unit Tests -Running NUnit Tests

There are a few ways to run unit tests in Visual Studio - in each case the same tests are run, so the best option for you will depend on what tools you already have installed and how interested you are in setting yourself up to run tests frequently.

 Option One: JetBrains ReSharper Unit Test Runner
If you have JetBrains ReSharper installed it includes a fantastic unit test runner that understands NUnit tests.  You can just right-click on the VistaDB.NUnit project and select Run Unit Tests.  It also has integrated options to debug unit tests, run just one unit test, etc.

 Option Two: Using the Visual Studio Test Runner

As of Visual Studio 2012 there is a built-in, extensible unit test runner that NUnit can integrate with.  For a rundown of instructions to set it up, see NUnit Test Adapter for Visual Studio 2012 and 2013.

 Option Three: Using the NUnit Test Runner
Type your Collapsible Section text here.

By default the VistaDB.NUnit project will attempt to execute the NUnit test runner. This assumes you installed the same version at the default location:

C:\Program Files (x86)\NUnit 2.6.2\bin\nunit.exe

If the version is different you should manually update the project to load the correction version.

Updating the project to use the NUnit Test Runner

Right click on the VistaDB.NUnit project name and select properties.

Choose the DEBUG tab from the left side of the window.

Under the Start Action item you want to choose Start External Program: and enter the EXE you want to run. Note that you can also use the Command line version of NUnit here as well.

Running NUnit

Pressing Ctrl-F5 to run, or F5 to debug will now launch the NUnit GUI.


Any tests that fail will have an error message on the right hand side, and the circle next to the test will appear in red.

Tests in yellow have been ignored, and green tests passed.

See Also