Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Image Removed

File

What is NUnit?

NUnit is a unit testing framework for the .NET environment. The NUnit action can be pointed to either run tests via multiple .dll files or through a .NET/NUnit project or solution.

Creating & Editing an NUnit Action

Image Added

Properties

Name

The name that will be used to identify this action. Note that Name is auto-populated with the file names that are entered in the Files property.

Enabled

Only enabled actions will run when a build is executed. If an action is disabled then it will be ignored at runtime.

Files

This field can a contain single testable file or multiple testable files . You can choose to input each file or you can choose to use a pattern that matches testable files. In order to match multiple files using patterns, you will need to put the pattern in Ant Pattern format. including .dll files, NUnit projects or .NET projects and solutions. All files specified are relative to the agent's workspace so to reference the output directory of the workspace, you only need Output\ (not $Workspace$\Output). However you can still specify absolute files such as C:\myTests and the NUnit action will point to the correct location.

This field also supports Ant Patterns to specify multiple files. For example, \Output\**tests.dll would test all .dll's that end with tests which are located in the Workspace's output folder and any of its subdirectories.

Each file/pattern must be start on its own a new line.

Output

...

File

When NUnit executes, the output will be stored in this file. Even when specifying multiple files to test, all of the output it put into a single file.

...

The output file specified is relative to the agent's workspace so to reference the output directory of the workspace, you only need Output\ (not $Workspace$\Output). However you can still specify absolute files such as C:\myTests and the NUnit action will generate the output file in the correct location.

Project Configuration

If you've specified a Visual Studio or NUnit project then you can specify the configuration you want to test against. For example, Debug, Release, etc...

...

Test Fixture

If you want to test a certain fixture, enter it here. If you leave this input empty it will test every fixture.

...