---
title: AttachableWrapper
framework: testing
role: symbol
role_heading: Protocol
path: testing/attachablewrapper
---

# AttachableWrapper

A protocol describing a type whose instances can be recorded and saved as part of a test run and which contains another value that it stands in for.

## Declaration

```swift
protocol AttachableWrapper<Wrapped> : Attachable, ~Copyable
```

## Overview

Overview To attach an attachable value to a test, pass it to record(_:named:sourceLocation:). To further configure an attachable value before you attach it, use it to initialize an instance of Attachment and set its properties before passing it to record(_:sourceLocation:). An attachable value can only be attached to a test once. A type can conform to this protocol if it represents another type that cannot directly conform to Attachable, such as a non-final class or a type declared in a third-party module.

## Topics

### Associated Types

- [Wrapped](testing/attachablewrapper/wrapped.md)

### Instance Properties

- [wrappedValue](testing/attachablewrapper/wrappedvalue.md)

## Relationships

### Inherits From

- [Attachable](testing/attachable.md)

## See Also

### Attaching values to tests

- [Attachment](testing/attachment.md)
- [Attachable](testing/attachable.md)
