---
title: TestTrait
framework: testing
role: symbol
role_heading: Protocol
path: testing/testtrait
---

# TestTrait

A protocol describing a trait that you can add to a test function.

## Declaration

```swift
protocol TestTrait : Trait
```

## Overview

Overview The testing library defines a number of traits that you can add to test functions. You can also define your own traits by creating types that conform to this protocol, or to the SuiteTrait protocol.

## Topics

### Type Methods

- [evaluates(_:info:)](testing/testtrait/evaluates(_:info:).md)

## Relationships

### Inherits From

- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [Trait](testing/trait.md)

### Conforming Types

- [Bug](testing/bug.md)
- [Comment](testing/comment.md)
- [ConditionTrait](testing/conditiontrait.md)
- [IssueHandlingTrait](testing/issuehandlingtrait.md)
- [ParallelizationTrait](testing/parallelizationtrait.md)
- [Tag.List](testing/tag/list.md)
- [TimeLimitTrait](testing/timelimittrait.md)

## See Also

### Creating custom traits

- [Trait](testing/trait.md)
- [SuiteTrait](testing/suitetrait.md)
- [TestScoping](testing/testscoping.md)
