---
title: "payloadTestRequest(with:completion:)"
framework: matter
role: symbol
role_heading: Instance Method
path: "matter/mtrbaseclustergeneraldiagnostics/payloadtestrequest(with:completion:)"
---

# payloadTestRequest(with:completion:)

Command PayloadTestRequest

## Declaration

```swift
func payloadTestRequest(with params: MTRGeneralDiagnosticsClusterPayloadTestRequestParams, completion: @escaping @Sendable (MTRGeneralDiagnosticsClusterPayloadTestResponseParams?, (any Error)?) -> Void)
```

```swift
func payloadTestRequest(with params: MTRGeneralDiagnosticsClusterPayloadTestRequestParams) async throws -> MTRGeneralDiagnosticsClusterPayloadTestResponseParams
```

## Discussion

Discussion This command provides a means for certification tests or manufacturer’s internal tests to validate particular command handling and encoding constraints by generating a response of a given size.
