@manhnguyenv

Welcome to my blog!

NUnit in VS2010

July 13, 2017 10:41

Like in older versions of Visual Studio it is possible to use NUnit as an external tool in the new 2010 version. By creating a toolbar as well it is very easy to run your test suite. The usual way to add an external command is by clicking the menu Tools -> External Tools. However, by default this menu item is not visible. To enable this menu item go to Tools -> Settings -> Expert Settings.

Visual Studio 2010

 

The first step is download and install the latest version of NUnit since older versions are not compatible with .NET 4. NUnit version 2.5.5 can be downloaded here.

Now go to Tools -> External Tools:

Visual Studio 2010 External Tools

I think this screen shot explains itself very well. Now its possible to add this external command to a tool bar. To do so go to View -> Toolbars -> Customize:

Visual Studio 2010 Customize Toolbars

Press the New button and enter a name. Now open the Commands tab and add the external command (usually External Command 1 when you don’t have any other external commands) to the toolbar:

Visual Studio 2010 Toolbars

When clicking the NUnit button in the new toolbar the NUnit GUI starts and loads your test suite.

Refer: http://www.marthijnvandenheuvel.com/2010/06/09/using-nunit-in-visual-studio-2010/

Categories