# <categories>

Controls the categories of tests to execute using the <nunit2> task.

### Parameters

Attribute | Type | Description | Required
--- | --- | --- | ---
id | string | The ID used to be referenced later. | False
refid | string | The ID to use as the reference. | False

### Nested Elements:

#### <include>

Specifies a list of categories to include.

Represents a certain group of test cases or fixtures.

### Parameters

Attribute | Type | Description | Required
--- | --- | --- | ---
name | string | A name of a category, or comma-separated list of names. | True
if | bool | If true then the category will be processed; otherwise, skipped. The default is true. | False
unless | bool | If true then the category will be skipped; otherwise, processed. The default is false. | False

#### </include>

#### <exclude>

Specifies a list of categories to exclude.

Represents a certain group of test cases or fixtures.

### Parameters

Attribute | Type | Description | Required
--- | --- | --- | ---
name | string | A name of a category, or comma-separated list of names. | True
if | bool | If true then the category will be processed; otherwise, skipped. The default is true. | False
unless | bool | If true then the category will be skipped; otherwise, processed. The default is false. | False

#### </exclude>

### Examples

- Only include test cases and fixtures that require no internet access.

      <categories>
          <include name="NoInternetAccess" />
      </categories>

- Exclude test cases and fixtures that are known to fail.

      <categories>
          <exclude name="NotWorking" />
      </categories>

### Requirements

Assembly: NAnt.NUnit2Tasks (0.91.4312.0)