<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "XCTest",
  "identifier" : "/documentation/XCTest/XCTSkip-swift.struct",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "XCTest"
    ],
    "preciseIdentifier" : "s:6XCTest7XCTSkipV"
  },
  "title" : "XCTSkip"
}
-->

# XCTSkip

An error that causes the current test to cease executing and the test runner to mark the test as skipped when the test throws the error.

```
struct XCTSkip
```

## Topics

### Skipping a Test

[`init(_:file:line:)`](/documentation/XCTest/XCTSkip-swift.struct/init(_:file:line:))

Intitializes an error to skip a test.

### Describing a Skipped Test

[`message`](/documentation/XCTest/XCTSkip-swift.struct/message)

An optional description of the skipped test, displayed in the Test navigator.

## Relationships

### Conforms To

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

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

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

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

---

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)