---
title: EvaluationTrait
framework: evaluations
role: symbol
role_heading: Structure
path: evaluations/evaluationtrait
---

# EvaluationTrait

A test trait that runs an evaluation and records the result as attachments.

## Declaration

```swift
struct EvaluationTrait
```

## Mentioned in

Evaluating language model responses Evaluating tool-calling behavior

## Overview

Overview The result is accessible via EvaluationContext.

## Relationships

### Conforms To

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

## See Also

### Swift Testing integration

- [EvaluationContext](evaluations/evaluationcontext.md)
