Test Runner GUI

NUnit provides two test runner interfaces—GUI and console. Both interfaces provide similar functionality. The test runner GUI is most useful for testing code while you are developing. The test runner console is useful in automated testing environments.

The test runner GUI can be launched using either the shortcut that is created when NUnit is installed or from the command line, as discussed later in this section.

This section describes the test runner GUI. Examples use the nunit.tests.dll assembly that the NUnit developers use to test NUnit; this assembly installs with NUnit into the bin subdirectory.

User Interface

The following sections describe the different parts of the test runner GUI.

Test tree view

The test tree view displays on the Test tab at the left side of the test runner GUI. It displays the hierarchy of test suites, test fixtures, and tests in the assembly.

The success or failure of each test is shown in the tree view—a green dot indicates success, a red dot indicates failure, and a yellow dot indicates that a test was not run. The tree view also allows you to selectively run single tests or groups of tests.

Figure 1-7 shows the test runner GUI.

A test runner GUI without checkboxes

Figure 1-7. A test runner GUI without checkboxes

You can display checkboxes for each node in the tree view, allowing you to select tests to run. Select or deselect the menu item View → CheckBoxes.

Figure 1-8 shows the test ...

Get NUnit Pocket Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.