---
title: CustomTestArgumentEncodable
framework: testing
role: symbol
role_heading: Protocol
path: testing/customtestargumentencodable
---

# CustomTestArgumentEncodable

A protocol for customizing how arguments passed to parameterized tests are encoded, which is used to match against when running specific arguments.

## Declaration

```swift
protocol CustomTestArgumentEncodable : Sendable
```

## Mentioned in

Implementing parameterized tests

## Overview

Overview The testing library checks whether a test argument conforms to this protocol, or any of several other known protocols, when running selected test cases. When a test argument conforms to this protocol, that conformance takes highest priority, and the testing library will then call encodeTestArgument(to:) on the argument. A type that conforms to this protocol is not required to conform to either Encodable or Decodable. See Implementing parameterized tests for a list of the other supported ways to allow running selected test cases.

## Topics

### Instance Methods

- [encodeTestArgument(to:)](testing/customtestargumentencodable/encodetestargument(to:).md)

## Relationships

### Inherits From

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

## See Also

### Related Documentation

- [Implementing parameterized tests](testing/parameterizedtesting.md)

### Test parameterization

- [Implementing parameterized tests](testing/parameterizedtesting.md)
- [Test(_:_:arguments:)](testing/test(_:_:arguments:)-8kn7a.md)
- [Test(_:_:arguments:_:)](testing/test(_:_:arguments:_:).md)
- [Test(_:_:arguments:)](testing/test(_:_:arguments:)-3rzok.md)
- [Test.Case](testing/test/case.md)
