---
title: XCTIssue
framework: xctest
role: symbol
role_heading: Structure
path: xctest/xctissue-swift.struct
---

# XCTIssue

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

## Declaration

```swift
struct XCTIssue
```

## Topics

### Issue Types

- [XCTIssue.IssueType](xctest/xctissue-swift.struct/issuetype.md)

### Issue Details

- [type](xctest/xctissue-swift.struct/type.md)
- [compactDescription](xctest/xctissue-swift.struct/compactdescription.md)
- [detailedDescription](xctest/xctissue-swift.struct/detaileddescription.md)
- [sourceCodeContext](xctest/xctissue-swift.struct/sourcecodecontext.md)
- [associatedError](xctest/xctissue-swift.struct/associatederror.md)
- [attachments](xctest/xctissue-swift.struct/attachments.md)
- [add(_:)](xctest/xctissue-swift.struct/add(_:).md)

### Initializers

- [init(type:compactDescription:detailedDescription:sourceCodeContext:associatedError:attachments:severity:)](xctest/xctissue-swift.struct/init(type:compactdescription:detaileddescription:sourcecodecontext:associatederror:attachments:severity:).md)

### Instance Properties

- [isFailure](xctest/xctissue-swift.struct/isfailure.md)
- [severity](xctest/xctissue-swift.struct/severity-swift.property.md)

### Type Aliases

- [XCTIssue.Severity](xctest/xctissue-swift.struct/severity-swift.typealias.md)

## Relationships

### Conforms To

- [Copyable](swift/copyable.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [Hashable](swift/hashable.md)

## See Also

### Test Failures

- [XCTIssueReference](xctest/xctissuereference.md)
- [XCTMutableIssue](xctest/xctmutableissue.md)
- [XCTSourceCodeContext](xctest/xctsourcecodecontext.md)
- [XCTSourceCodeFrame](xctest/xctsourcecodeframe.md)
- [XCTSourceCodeLocation](xctest/xctsourcecodelocation.md)
- [XCTSourceCodeSymbolInfo](xctest/xctsourcecodesymbolinfo.md)
