<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "XCTest",
  "identifier" : "/documentation/XCTest/XCTMutableIssue",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "XCTest"
    ],
    "preciseIdentifier" : "c:objc(cs)XCTMutableIssue"
  },
  "title" : "XCTMutableIssue"
}
-->

# XCTMutableIssue

A mutable object that represents a test failure, and includes source code call stacks for test reporting and investigation.

```
class XCTMutableIssue
```

## Topics

### Issue Details

[`var type: XCTIssueReference.IssueType`](/documentation/XCTest/XCTMutableIssue/type)

A value for classifying an issue that occurs during testing.

[`var compactDescription: String`](/documentation/XCTest/XCTMutableIssue/compactDescription)

A concise description of the issue with no transient data, suitable for use in test run summaries and results aggregation across multiple test runs.

[`var detailedDescription: String?`](/documentation/XCTest/XCTMutableIssue/detailedDescription)

A detailed description of the issue that may include transient data, such as numbers, object identifiers, and timestamps, to help diagnose the issue.

[`var sourceCodeContext: XCTSourceCodeContext`](/documentation/XCTest/XCTMutableIssue/sourceCodeContext)

The source code location for the issue, including the filename, line number, and call stack.

[`var associatedError: (any Error)?`](/documentation/XCTest/XCTMutableIssue/associatedError)

An optional error to associate with a test issue.

[`var attachments: [XCTAttachment]`](/documentation/XCTest/XCTMutableIssue/attachments)

An array of data that augments an issue, such as files, images, screenshots, data blobs, or ZIP files.

[`func add(XCTAttachment)`](/documentation/XCTest/XCTMutableIssue/add(_:))

Adds supporting data to an issue.

### Instance Properties

[`var severity: XCTIssueReference.Severity`](/documentation/XCTest/XCTMutableIssue/severity)

## Relationships

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`CVarArg`](/documentation/Swift/CVarArg)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`Equatable`](/documentation/Swift/Equatable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSMutableCopying`](/documentation/Foundation/NSMutableCopying)

### Inherits From

[`XCTIssueReference`](/documentation/XCTest/XCTIssueReference)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)