---
title: Comment
framework: testing
role: symbol
role_heading: Structure
path: testing/comment
---

# Comment

A type that represents a comment related to a test.

## Declaration

```swift
struct Comment
```

## Overview

Overview Use this type to provide context or background information about a test’s purpose, explain how a complex test operates, or include details which may be helpful when diagnosing issues recorded by a test. To add a comment to a test or suite, add a code comment before its @Test or @Suite attribute. See Adding comments to tests for more details. note: To reference bugs related to a test, use bug(_:_:), bug(_:id:_:), or bug(_:id:_:).

## Topics

### Instance Properties

- [rawValue](testing/comment/rawvalue.md)

## Relationships

### Conforms To

- [Copyable](swift/copyable.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Decodable](swift/decodable.md)
- [Encodable](swift/encodable.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [ExpressibleByExtendedGraphemeClusterLiteral](swift/expressiblebyextendedgraphemeclusterliteral.md)
- [ExpressibleByStringInterpolation](swift/expressiblebystringinterpolation.md)
- [ExpressibleByStringLiteral](swift/expressiblebystringliteral.md)
- [ExpressibleByUnicodeScalarLiteral](swift/expressiblebyunicodescalarliteral.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [SuiteTrait](testing/suitetrait.md)
- [TestTrait](testing/testtrait.md)
- [Trait](testing/trait.md)

## See Also

### Supporting types

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