NUnit Testing Framework
NUnit is a freely available, open source product that provides a testing framework and test runners.
NUnit provides an easy way to mark and run individual tests and fixtures by using categories. You can associate different test methods with one or more categories, and then select which categories you want to exclude (or include) when running the tests.
To use NUnit add a reference to nunit.framework.dll in the Visual Studio project in order to compile and use test code.
You should distribute NUnit via your version control system.
Many .NET projects define both a src/ folder and a lib/ folder. The src/ folder contains the source code to the project, and the lib/ folder contains pre-compiled components (usually third-party).
In this context, you will have a lib/nunit/ folder that contains the NUnit binary distribution. Your projects and Nant files would reference the nunit.framework.dll in this folder, and developers would run the nunit.exe GUI from this folder via a shortcut.
This keeps developer versions of NUnit synchronized, making deploying any upgrades or customizations easy and also keeps the environment consistent. Avoid installing NUnit on a local workstation to reduce confusion.
NUnit and WinForms Applications
To unit test Windows Forms, use NUnitForms framework (NUnitForms.dll), which is an extension of NUnit.
NUnitForms can also simulate a user changing fields in the GUI via the keyboard, and all other kinds of things, relatively easily.
NUnitForms has a way to deal with Modal dialogs, using the ExpectModal method in the NUnitFormTest class. To use it (or any other NUnitForms methods), we derive our fixture from NUnitFormTest and call ExpectModal, passing the name of the caption (title) of the modal dialog. When a modal dialog is displayed that has the specified caption, the handler method is called.
NUnit and Web Applications