Legacy Documentation. View NUnit 3 Documentation

NUnit Gui Runner

The nunit.exe program is a graphical runner. It shows the tests in an explorer-like browser window and provides a visual indication of the success or failure of the tests. It allows you to selectively run single tests or suites and reloads automatically as you modify and re-compile your code. The following is a screenshot of NUnit running the same mock-assembly.dll shown in the nunit-console example.

Tree Display

This version of NUnit uses symbols in the test tree, which allow those who are unable to easily distinguish colors to determine the test status. Successful tests are colored green, with a check mark. Tests that are ignored are marked with a yellow circle, containing a question mark. If any tests had failed, they would be marked red, with an X symbol.

In this example, there were a total of 11 test cases, but one of them was not counted because it was marked Explicit. Note that it is shown as a gray circle in the tree. Of the remaining 10 tests, 5 were run successfully and 5 were ignored.

The symbols shown in the tree are actually files in the NUnit bin directory. These files are named Success.jpg, Failure.jpg and Ignored.jpg and may be modified or replaced by the user.

Note: Beginning with NUnit 2.6, tests marked with the IgnoreAttribtute are shown in yellow immediately upon loading. Similarly, non-runnable tests (e.g.: wrong argument type) are shown in red at load time.

Progress Bar

The progress bar shows the progress of the test. It is colored according to the "worst" result obtained: red if there were any failures, yellow if some tests were ignored and green for success.

Result Summary

At the end of the test run, a summary of the results is displayed immediately below the progress bar. If the result information does not fit in the space available, hovering over it shows the full information.

Result Tabs

The tabs along the bottom of the display show the results of running a test. The Errors and Failures tab displays the error message and stack trace for both unexpected exceptions and assertion failures. Beginning with NUnit 2.5, source code for each stack location can be displayed in this tab - as is seen above - provided that the program was compiled with debug information.

The Tests Not Run tab provides a list of all tests that were selected for running but were not run, together with the reason.

The Text Output tab displays text output from the tests, potentially including console output, trace output and log output. The default display provides a single tab, but additional tabs may be created by the user to hold specific kinds of output. For more information on creating new tabs, see the documentation for the Settings Dialog.

Mini-Gui

Since the release of NUnit 2.4, an alternate "mini-gui" is also available. It may be selected from the View menu. In the following screenshot, the mini gui window has been positioned next to the Visual Studio IDE so that both windows can be seen.