By default the installation program places all of the files into the C:\Program Files\NUnit 2.2 directory. In the installation directory there are three sub-directories: bin, doc, and src.
If multiple versions of the .NET framework are installed, the configuration files nunit-gui.exe.config and nunit-console.exe.config control which one of them is selected when running the gui and console runner respectively. As originally installed, that order is .NET 1.1, .NET 2.0 and .NET 1.0. To change which version is used, simply change the order of the elements in the config files. The nunit-gui About Box shows the framework version currently being used.
Settings that you place in these files are not available to your tests or to the production code you are testing. A separate config file is used when running tests. If you are running tests from the test.dll assembly, the config file should be named test.dll.config. If you are running tests from the NUnit test project MyTests.nunit, the config file should be named MyTests.config. In either case the config file must reside in the same directory as the file from which it takes its name.
In addition to settings of your own, the config file for a set of tests may contain information used by NUnit in loading your tests. In particular, this allows you to control the apartment state and priority of the thread that NUnit uses to run your tests. Other settings may be added in the future. See the file nunit.tests.dll for an example.
The installation program places a number of items in the Start menu. There is a shortcut to the nunit-gui executable. (There is also a shortcut placed directly on the desktop). In addition to the executable file, the menu items under Samples bring up the folder for the particular sample. The source shortcut brings up the folder which contains the source for the project.
The way we verify that the installation has worked successfully is to install the program and run the tests that were used to build the program. These tests can be found in the assembly nunit.tests.dll. There should be 605 tests and they should all pass.
The assembly timing-tests.dll contains several long-running tests that are used to verify that all remoting timeout problems have been fixed. The test cases all run for six to 12 minutes and give no indication whatsoever that they are working! This is required since correct handling of a non-communicative user test is what these tests are all about.
Additional tests are included with the samples and in separate assemblies used as data by the verification tests themselves. Failures or not run conditions in these tests are intentional.
Those building NUnit from source code may either build the install project and run the msi that is created or perform a manual installation by following these steps:
1. Copy the following files to the target directory:
- * nunit.framework.dll
3. Create shortcuts as needed.
4. If you want to be able to run the nunit tests, copy the following files to the same location as the others:
- * mock-assembly.dll
Installation Under Mono
Mono is delivered with a version of NUnit already pre-installed. The Mono 1.0 release included a beta version of NUnit 2.2. Later builds may include a more up-to-date version of NUnit. Before attempting to install NUnit under Mono, determine whether an equivalent or newer version is already installed. It may be necessary to remove the pre-installed version from the GAC in order for the new version to be recognized.