Legacy Documentation. View NUnit 3 Documentation

Installation

By default the NUnit installation program places all of the files into the C:\Program Files\NUnit 2.5.7 directory. In the installation directory there are up to four sub-directories: net-1.1, net-2.0, doc, and samples. The actual number depends on what the user has chosen to install. Source code is no longer provided with the binary installation package. Download the source package if source is needed.

Running NUnit

The installation program places a number of shortcuts in the start menu, which run NUnit under .NET or Mono, depending on what is installed on your system. For NUnit 2.5, the gui only runs under version 2.0 of the CLR, although tests may be executed under other versions using a separate process.

Configuration

When running NUnit from the command line or through the desktop shortcut, the configuration files files nunit.exe.config and nunit-console.exe.config control the operation of NUnit itself. 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 for your tests themselves. 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 Configuration Files page for further information on configuration.

Installation Verification

NUnit's own tests are available as an installation option. If you installed the tests, you may verify that the installation has worked successfully by running the NUnit gui and loading and running NUnitTests.nunit. All tests should pass.

Note: Although the NUnit installation has been modified to allow non-admin users to install, there are still a large number of tests which can only run successfully under an administrative id. This is a problem with the code in the tests themselves, not with NUnit.

Timing Tests

The assembly timing-tests.dll contains several tests that measure the performance of NUnit in loading tests. In addition, it contains some 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

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.

Manual Installation

You may build NUnit from source using one of the Visual Studio solutions or the NAnt script. In either case, an output directory is created, which contains all files needed in the proper relative location. Just copy this directory to a permanent location and create shortcuts if desired.