---
title: XCTSkipUnless
framework: xctest
role: symbol
role_heading: Macro
path: xctest/xctskipunless
---

# XCTSkipUnless

Skips remaining tests in a test method unless the specified condition is met.

## Declaration

```occ
#define XCTSkipUnless(expression, ...)
```

## Discussion

Discussion Call this macro to skip any remaining code and assertions in the test method when expression evaluates to false, and mark the test method as skipped. If a test failure occurs in the test method before the skip, the test runner marks the test method as failed.

## See Also

### Methods for Skipping Tests

- [XCTSkipIf](xctest/xctskipif.md)
- [XCTSkip](xctest/xctskip-c.macro.md)
