{"id":"f2e6cd64-2573-4961-89a5-158475100c14","shortId":"76n56X","kind":"skill","title":"swift-testing","tagline":"Write and migrate tests using the Swift Testing framework with @Test, @Suite, #expect, #require, confirmation, parameterized tests, test tags, traits, withKnownIssue, XCTest UI testing, XCUITest, test plan, mocking, test doubles, testable architecture, snapshot testing, async tes","description":"# Swift Testing\n\nSwift Testing is the modern testing framework for Swift (Xcode 16+, Swift 6+). Prefer it over XCTest for all new unit tests. Use XCTest only for UI tests, performance benchmarks, and snapshot tests.\n\n## Contents\n\n- [Basic Tests](#basic-tests)\n- [@Test Traits](#test-traits)\n- [#expect and #require](#expect-and-require)\n- [@Suite and Test Organization](#suite-and-test-organization)\n- [Known Issues](#known-issues)\n- [Additional Patterns](#additional-patterns)\n- [Parameterized Tests In Depth](#parameterized-tests-in-depth)\n- [Tags and Suites In Depth](#tags-and-suites-in-depth)\n- [Async Testing Patterns](#async-testing-patterns)\n- [Traits In Depth](#traits-in-depth)\n- [Common Mistakes](#common-mistakes)\n- [Test Attachments](#test-attachments)\n- [Exit Testing](#exit-testing)\n- [Review Checklist](#review-checklist)\n- [References](#references)\n\n---\n\n## Basic Tests\n\n```swift\nimport Testing\n\n@Test(\"User can update their display name\")\nfunc updateDisplayName() {\n    var user = User(name: \"Alice\")\n    user.name = \"Bob\"\n    #expect(user.name == \"Bob\")\n}\n```\n\n## @Test Traits\n\n```swift\n@Test(\"Validates email format\")                                    // display name\n@Test(.tags(.validation, .email))                                  // tags\n@Test(.disabled(\"Server migration in progress\"))                   // disabled\n@Test(.enabled(if: ProcessInfo.processInfo.environment[\"CI\"] != nil)) // conditional\n@Test(.bug(\"https://github.com/org/repo/issues/42\"))               // bug reference\n@Test(.timeLimit(.minutes(1)))                                     // time limit\n@Test(\"Timeout handling\", .tags(.networking), .timeLimit(.seconds(30))) // combined\n```\n\n## #expect and #require\n\n```swift\n// #expect records failure but continues execution\n#expect(result == 42)\n#expect(name.isEmpty == false)\n#expect(items.count > 0, \"Items should not be empty\")\n\n// #expect with error type checking\n#expect(throws: ValidationError.self) {\n    try validate(email: \"not-an-email\")\n}\n\n// #expect with specific error value\n#expect {\n    try validate(email: \"\")\n} throws: { error in\n    guard let err = error as? ValidationError else { return false }\n    return err == .empty\n}\n\n// #require records failure AND stops test (like XCTUnwrap)\nlet user = try #require(await fetchUser(id: 1))\n#expect(user.name == \"Alice\")\n\n// #require for optionals -- unwraps or fails\nlet first = try #require(items.first)\n#expect(first.isValid)\n```\n\n**Rule: Use `#require` when subsequent assertions depend on the value. Use `#expect` for independent checks.**\n\n## @Suite and Test Organization\n\nSee [references/testing-patterns.md](references/testing-patterns.md) for suite organization, confirmation patterns, and known-issue handling.\n\n## Known Issues\n\nMark expected failures so they do not cause test failure:\n\n```swift\nwithKnownIssue(\"Propane tank is empty\") {\n    #expect(truck.grill.isHeating)\n}\n\n// Intermittent / flaky failures\nwithKnownIssue(isIntermittent: true) {\n    #expect(service.isReachable)\n}\n\n// Conditional known issue\nwithKnownIssue {\n    #expect(foodTruck.grill.isHeating)\n} when: {\n    !hasPropane\n}\n```\n\nIf no known issues are recorded, Swift Testing records a distinct issue notifying you the problem may be resolved.\n\n## Additional Patterns\n\nSee [references/testing-patterns.md](references/testing-patterns.md) for complete examples of:\n\n- **TestScoping** -- custom test lifecycle with setup/teardown consolidation\n- **Mocking and Test Doubles** -- protocol-based doubles and testable architecture\n- **View Model Testing** -- environment injection and dependency isolation\n- **Async Patterns** -- clock injection and error path testing\n- **XCUITest** -- page objects, performance testing, snapshot testing, and test file organization\n\n## Parameterized Tests In Depth\n\n### @Test with Arguments\n\nPass any `Sendable` & `Collection` to `arguments:`. Each element runs as an independent test case.\n\n```swift\n// Enum-based: runs one case per enum value\nenum Environment: String, CaseIterable, Sendable {\n    case development, staging, production\n}\n\n@Test(\"Base URL is valid for all environments\", arguments: Environment.allCases)\nfunc baseURLIsValid(env: Environment) throws {\n    let url = try #require(URL(string: Config.baseURL(for: env)))\n    #expect(url.scheme == \"https\")\n}\n```\n\n### Ranges as Arguments\n\n```swift\n@Test(\"Fibonacci is positive for small inputs\", arguments: 1...20)\nfunc fibonacciPositive(n: Int) {\n    #expect(fibonacci(n) > 0)\n}\n```\n\n### Multiple Parameter Sources\n\nTwo argument collections produce a **cartesian product** (every combination):\n\n```swift\n@Test(arguments: [\"light\", \"dark\"], [\"iPhone\", \"iPad\"])\nfunc snapshotTest(colorScheme: String, device: String) {\n    // Runs 4 combinations: light+iPhone, light+iPad, dark+iPhone, dark+iPad\n    let config = SnapshotConfig(colorScheme: colorScheme, device: device)\n    #expect(config.isValid)\n}\n```\n\nUse `zip` for **1:1 pairing** (avoids cartesian product):\n\n```swift\n@Test(arguments: zip(\n    [200, 201, 204],\n    [\"OK\", \"Created\", \"No Content\"]\n))\nfunc httpStatusDescription(code: Int, expected: String) {\n    #expect(HTTPStatus(code).description == expected)\n}\n```\n\n### Custom Argument Generators\n\nCreate a `CustomTestArgumentProviding` conformance or use computed static properties:\n\n```swift\nstruct APIEndpoint: Sendable {\n    let path: String\n    let expectedStatus: Int\n\n    static let testCases: [APIEndpoint] = [\n        .init(path: \"/users\", expectedStatus: 200),\n        .init(path: \"/missing\", expectedStatus: 404),\n    ]\n}\n\n@Test(\"API returns expected status\", arguments: APIEndpoint.testCases)\nfunc apiStatus(endpoint: APIEndpoint) async throws {\n    let response = try await client.get(endpoint.path)\n    #expect(response.statusCode == endpoint.expectedStatus)\n}\n```\n\n## Tags and Suites In Depth\n\n### Custom Tag Definitions\n\nDeclare tags as static members on `Tag`:\n\n```swift\nextension Tag {\n    @Tag static var networking: Self\n    @Tag static var database: Self\n    @Tag static var slow: Self\n    @Tag static var critical: Self\n    @Tag static var smoke: Self\n}\n```\n\n### Filtering Tests by Tag\n\nRun tagged tests from Xcode Test Plans or the command line. Tag-based filtering\nsyntax varies by toolchain — verify the exact flags for your Swift version:\n\n```bash\n# Filter by tag (tooling-specific — verify syntax for your Swift version)\nswift test --filter tag:networking\n```\n\nIn Xcode, configure Test Plans to include/exclude tags for different CI configurations (smoke tests vs full suite).\n\n### @Suite for Grouping\n\n```swift\n@Suite(\"Shopping Cart Operations\")\nstruct ShoppingCartTests {\n    let cart: ShoppingCart\n\n    // init acts as setUp -- runs before each test in the suite\n    init() {\n        cart = ShoppingCart()\n        cart.add(Product(name: \"Widget\", price: 9.99))\n    }\n\n    @Test func itemCount() {\n        #expect(cart.items.count == 1)\n    }\n\n    @Test func totalPrice() {\n        #expect(cart.total == 9.99)\n    }\n}\n```\n\n### Suite-Level Setup and Teardown\n\nUse `init` for setup and `deinit` for teardown. For async cleanup, use a `TestScoping` trait:\n\n```swift\n@Suite(.tags(.database))\nstruct DatabaseTests {\n    let db: TestDatabase\n\n    init() async throws {\n        db = try await TestDatabase.createTemporary()\n    }\n\n    // deinit works for synchronous cleanup (struct suites only use init)\n    // For async teardown, use TestScoping trait instead\n\n    @Test func insertRecord() async throws {\n        try await db.insert(Record(id: 1, name: \"Test\"))\n        let count = try await db.count()\n        #expect(count == 1)\n    }\n}\n```\n\n### Warning-Severity Issues\n\nRecord issues that surface in test output but don't fail the test. Use for performance regressions, deprecated paths, or non-critical checks you want to track.\n\n```swift\nIssue.record(\n    \"Processing took \\(elapsed)s — exceeds 2s target\",\n    severity: .warning\n)\n```\n\n## Async Testing Patterns\n\n### Testing Async Functions\n\n`@Test` functions can be `async` and `throws` directly:\n\n```swift\n@Test func fetchUserProfile() async throws {\n    let service = UserService(client: MockHTTPClient())\n    let user = try await service.fetchProfile(id: 42)\n    #expect(user.name == \"Alice\")\n}\n```\n\n### Testing Actor-Isolated Code\n\nAccess actor-isolated state with `await`:\n\n```swift\nactor Counter {\n    private(set) var value = 0\n    func increment() { value += 1 }\n}\n\n@Test func counterIncrements() async {\n    let counter = Counter()\n    await counter.increment()\n    await counter.increment()\n    let value = await counter.value\n    #expect(value == 2)\n}\n```\n\n### Timeout for Hanging Tests\n\nUse `.timeLimit` to prevent tests from hanging indefinitely:\n\n```swift\n@Test(.timeLimit(.seconds(5)))\nfunc networkCallCompletes() async throws {\n    let result = try await api.fetchData()\n    #expect(result.isEmpty == false)\n}\n```\n\nIf the test exceeds the time limit, it fails immediately with a clear timeout diagnostic.\n\n### Confirmation (Replacing XCTestExpectation)\n\n`confirmation` replaces `XCTestExpectation` / `fulfill()` / `waitForExpectations`. It verifies that an event occurs the expected number of times:\n\n```swift\n@Test func notificationPosted() async throws {\n    // Expects the closure to call confirm() exactly once\n    try await confirmation(\"UserDidLogin posted\") { confirm in\n        let center = NotificationCenter.default\n        let observer = center.addObserver(\n            forName: .userDidLogin, object: nil, queue: .main\n        ) { _ in\n            confirm()\n        }\n        await loginService.login(user: \"test\", password: \"pass\")\n        center.removeObserver(observer)\n    }\n}\n\n// Expect multiple confirmations\n@Test func batchProcessing() async throws {\n    try await confirmation(\"Items processed\", expectedCount: 3) { confirm in\n        processor.onItemComplete = { _ in confirm() }\n        await processor.process(items: [a, b, c])\n    }\n}\n```\n\n### Programmatic Cancellation\n\nStop a test without marking it passed or failed. The test is recorded as \"cancelled\" — distinct from failure or a known issue.\n\n```swift\n@Test func requiresNetwork() throws {\n    guard NetworkMonitor.shared.isConnected else {\n        try Test.cancel(\"No network — skipping integration test\")\n    }\n    // ... test continues if connected\n}\n```\n\n## Traits In Depth\n\n### Conditional Traits\n\n```swift\n// Enable only on CI\n@Test(.enabled(if: ProcessInfo.processInfo.environment[\"CI\"] != nil))\nfunc integrationTest() async throws { ... }\n\n// Disable with a reason\n@Test(.disabled(\"Blocked by #123 -- server migration\"))\nfunc brokenEndpoint() async throws { ... }\n\n// Bug reference -- links test to an issue tracker\n@Test(.bug(\"https://github.com/org/repo/issues/42\", \"Intermittent timeout\"))\nfunc flakyNetworkTest() async throws { ... }\n```\n\n### Time Limits\n\n```swift\n@Test(.timeLimit(.minutes(2)))\nfunc longRunningImport() async throws {\n    try await importer.importLargeDataset()\n}\n\n// Apply time limit to entire suite\n@Suite(.timeLimit(.seconds(30)))\nstruct FastTests {\n    @Test func quick1() { ... }\n    @Test func quick2() { ... }\n}\n```\n\n### Custom Trait Definitions\n\nCreate reusable traits for common test configurations:\n\n```swift\nstruct DatabaseTrait: TestTrait, SuiteTrait, TestScoping {\n    func provideScope(\n        for test: Test,\n        testCase: Test.Case?,\n        performing function: @Sendable () async throws -> Void\n    ) async throws {\n        let db = try await TestDatabase.setUp()\n        defer { Task { await db.tearDown() } }\n        try await function()\n    }\n}\n\nextension Trait where Self == DatabaseTrait {\n    static var database: Self { .init() }\n}\n\n// Usage: any test with .database trait gets a fresh database\n@Test(.database)\nfunc insertUser() async throws { ... }\n```\n\n## Test Attachments\n\nAttach diagnostic data to test results for debugging failures. See [references/testing-patterns.md](references/testing-patterns.md) for full examples.\n\n```swift\n@Test func generateReport() async throws {\n    let report = try generateReport()\n    Attachment(report.data, named: \"report.json\").record()\n    #expect(report.isValid)\n}\n```\n\nImage attachments are available via cross-import overlays — import both `Testing` and a UI framework:\n\n```swift\nimport Testing\nimport UIKit\n\n@Test func renderedChart() async throws {\n    let image = renderer.image { ctx in chartView.drawHierarchy(in: bounds, afterScreenUpdates: true) }\n    Attachment(image, named: \"chart.png\").record()\n}\n```\n\n## Exit Testing\n\nTest code that calls `exit()`, `fatalError()`, or `preconditionFailure()`. See [references/testing-patterns.md](references/testing-patterns.md) for details.\n\n```swift\n@Test func invalidInputCausesExit() async {\n    await #expect(processExitsWith: .failure) {\n        processInvalidInput()  // calls fatalError()\n    }\n}\n```\n\n## Common Mistakes\n\n1. **Testing implementation, not behavior.** Test what the code does, not how.\n2. **No error path tests.** If a function can throw, test the throw path.\n3. **Flaky async tests.** Use `confirmation` with expected counts, not `sleep` calls.\n4. **Shared mutable state between tests.** Each test sets up its own state via `init()` in `@Suite`.\n5. **Missing accessibility identifiers in UI tests.** XCUITest queries rely on them.\n6. **Using `sleep` in tests.** Use `confirmation`, clock injection, or `withKnownIssue`.\n7. **Not testing cancellation.** If code supports `Task` cancellation, verify it cancels cleanly.\n8. **Mixing XCTest and Swift Testing in one file.** Keep them in separate files.\n9. **Non-Sendable test helpers shared across tests.** Ensure test helper types are Sendable when shared across concurrent test cases. Annotate MainActor-dependent test code with `@MainActor`.\n\n## Review Checklist\n\n- [ ] All new tests use Swift Testing (`@Test`, `#expect`), not XCTest assertions\n- [ ] Test names describe behavior (`fetchUserReturnsNilOnNetworkError` not `testFetchUser`)\n- [ ] Error paths have dedicated tests\n- [ ] Async tests use `confirmation()`, not `Task.sleep`\n- [ ] Parameterized tests used for repetitive variations\n- [ ] Tags applied for filtering (`.critical`, `.slow`)\n- [ ] Mocks conform to protocols, not subclass concrete types\n- [ ] No shared mutable state between tests\n- [ ] Cancellation tested for cancellable async operations\n\n## References\n\n- Testing patterns: [references/testing-patterns.md](references/testing-patterns.md)\n- Advanced testing (warnings, cancellation, image attachments): [references/testing-advanced.md](references/testing-advanced.md)","tags":["swift","testing","ios","skills","dpearson2699","accessibility","agent-skills","ai-coding","apple","claude-code","codex-skills","cursor-skills"],"capabilities":["skill","source-dpearson2699","skill-swift-testing","topic-accessibility","topic-agent-skills","topic-ai-coding","topic-apple","topic-claude-code","topic-codex-skills","topic-cursor-skills","topic-ios","topic-ios-development","topic-liquid-glass","topic-localization","topic-mapkit"],"categories":["swift-ios-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/dpearson2699/swift-ios-skills/swift-testing","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add dpearson2699/swift-ios-skills","source_repo":"https://github.com/dpearson2699/swift-ios-skills","install_from":"skills.sh"}},"qualityScore":"0.684","qualityRationale":"deterministic score 0.68 from registry signals: · indexed on github topic:agent-skills · 468 github stars · SKILL.md body (14,428 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-22T06:53:45.999Z","embedding":null,"createdAt":"2026-04-18T20:33:43.158Z","updatedAt":"2026-04-22T06:53:45.999Z","lastSeenAt":"2026-04-22T06:53:45.999Z","tsv":"'/missing':676 '/org/repo/issues/42':224,1272 '/users':671 '0':260,566,1027 '1':230,320,557,615,616,848,919,929,1031,1484 '123':1253 '16':52 '2':1049,1285,1496 '20':558 '200':625,673 '201':626 '204':627 '2s':969 '3':1170,1510 '30':240,1302 '4':593,1522 '404':678 '42':254,1004 '5':1066,1539 '6':54,1551 '7':1562 '8':1575 '9':1589 '9.99':842,854 'access':1013,1541 'across':1596,1606 'act':824 'actor':1010,1015,1021 'actor-isol':1009,1014 'addit':107,110,424 'additional-pattern':109 'advanc':1686 'afterscreenupd':1448 'alic':186,323,1007 'annot':1610 'api':680 'api.fetchdata':1075 'apiendpoint':657,668,689 'apiendpoint.testcases':685 'apistatus':687 'appli':1293,1656 'architectur':35,450 'argument':484,490,526,547,556,571,581,623,644,684 'assert':342,1630 'async':38,132,136,459,690,870,886,903,912,973,977,983,991,1035,1069,1117,1162,1243,1258,1277,1288,1337,1340,1378,1401,1438,1474,1512,1643,1679 'async-testing-pattern':135 'attach':152,155,1381,1382,1407,1415,1450,1691 'avail':1417 'avoid':618 'await':317,695,890,915,925,1001,1019,1039,1041,1045,1074,1128,1148,1165,1176,1291,1345,1349,1352,1475 'b':1180 'base':446,502,519,761 'baseurlisvalid':529 'bash':775 'basic':76,79,168 'basic-test':78 'batchprocess':1161 'behavior':1488,1634 'benchmark':71 'block':1251 'bob':188,191 'bound':1447 'brokenendpoint':1257 'bug':221,225,1260,1269 'c':1181 'call':1123,1460,1480,1521 'cancel':1183,1198,1565,1570,1573,1675,1678,1689 'cart':816,821,835 'cart.add':837 'cart.items.count':847 'cart.total':853 'cartesian':575,619 'case':498,505,514,1609 'caseiter':512 'caus':378 'center':1135 'center.addobserver':1139 'center.removeobserver':1154 'chart.png':1453 'chartview.drawhierarchy':1445 'check':270,351,957 'checklist':162,165,1619 'ci':217,803,1234,1239 'clean':1574 'cleanup':871,896 'clear':1091 'client':996 'client.get':696 'clock':461,1558 'closur':1121 'code':634,640,1012,1458,1492,1567,1615 'collect':488,572 'colorschem':588,606,607 'combin':241,578,594 'command':757 'common':146,149,1318,1482 'common-mistak':148 'complet':430 'comput':652 'concret':1667 'concurr':1607 'condit':219,397,1228 'config':604 'config.baseurl':539 'config.isvalid':611 'configur':795,804,1320 'confirm':18,362,1094,1097,1124,1129,1132,1147,1158,1166,1171,1175,1515,1557,1646 'conform':649,1662 'connect':1224 'consolid':439 'content':75,631 'continu':250,1222 'count':923,928,1518 'counter':1022,1037,1038 'counter.increment':1040,1042 'counter.value':1046 'counterincr':1034 'creat':629,646,1314 'critic':737,956,1659 'cross':1420 'cross-import':1419 'ctx':1443 'custom':434,643,706,1311 'customtestargumentprovid':648 'dark':583,599,601 'data':1384 'databas':727,879,1361,1368,1373,1375 'databasetest':881 'databasetrait':1323,1358 'db':883,888,1343 'db.count':926 'db.insert':916 'db.teardown':1350 'debug':1389 'declar':709 'dedic':1641 'defer':1347 'definit':708,1313 'deinit':866,892 'depend':343,457,1613 'deprec':951 'depth':115,120,125,131,141,145,481,705,1227 'describ':1633 'descript':641 'detail':1469 'develop':515 'devic':590,608,609 'diagnost':1093,1383 'differ':802 'direct':986 'disabl':207,212,1245,1250 'display':178,199 'distinct':415,1199 'doubl':33,443,447 'elaps':966 'element':492 'els':299,1213 'email':197,204,276,280,289 'empti':265,304,386 'enabl':214,1231,1236 'endpoint':688 'endpoint.expectedstatus':700 'endpoint.path':697 'ensur':1598 'entir':1297 'enum':501,507,509 'enum-bas':500 'env':530,541 'environ':454,510,525,531 'environment.allcases':527 'err':295,303 'error':268,284,291,296,464,1498,1638 'event':1106 'everi':577 'exact':769,1125 'exampl':431,1396 'exceed':968,1082 'execut':251 'exit':156,159,1455,1461 'exit-test':158 'expect':16,86,90,189,242,246,252,255,258,266,271,281,286,321,335,348,372,387,395,401,542,563,610,636,638,642,682,698,846,852,927,1005,1047,1076,1109,1119,1156,1412,1476,1517,1627 'expect-and-requir':89 'expectedcount':1169 'expectedstatus':663,672,677 'extens':717,1354 'fail':329,944,1087,1192 'failur':248,307,373,380,391,1201,1390,1478 'fals':257,301,1078 'fasttest':1304 'fatalerror':1462,1481 'fetchus':318 'fetchuserprofil':990 'fetchuserreturnsnilonnetworkerror':1635 'fibonacci':550,564 'fibonacciposit':560 'file':476,1583,1588 'filter':744,762,776,790,1658 'first':331 'first.isvalid':336 'flag':770 'flaki':390,1511 'flakynetworktest':1276 'foodtruck.grill.isheating':402 'format':198 'fornam':1140 'framework':12,48,1429 'fresh':1372 'fulfil':1100 'full':808,1395 'func':180,528,559,586,632,686,844,850,910,989,1028,1033,1067,1115,1160,1208,1241,1256,1275,1286,1306,1309,1327,1376,1399,1436,1472 'function':978,980,1335,1353,1503 'generat':645 'generatereport':1400,1406 'get':1370 'github.com':223,1271 'github.com/org/repo/issues/42':222,1270 'group':812 'guard':293,1211 'handl':235,368 'hang':1052,1060 'haspropan':404 'helper':1594,1600 'https':544 'httpstatus':639 'httpstatusdescript':633 'id':319,918,1003 'identifi':1542 'imag':1414,1441,1451,1690 'immedi':1088 'implement':1486 'import':171,1421,1423,1431,1433 'importer.importlargedataset':1292 'include/exclude':799 'increment':1029 'indefinit':1061 'independ':350,496 'init':669,674,823,834,862,885,901,1363,1536 'inject':455,462,1559 'input':555 'insertrecord':911 'insertus':1377 'instead':908 'int':562,635,664 'integr':1219 'integrationtest':1242 'intermitt':389,1273 'invalidinputcausesexit':1473 'ipad':585,598,602 'iphon':584,596,600 'isintermitt':393 'isol':458,1011,1016 'issu':103,106,367,370,399,408,416,933,935,1205,1266 'issue.record':963 'item':261,1167,1178 'itemcount':845 'items.count':259 'items.first':334 'keep':1584 'known':102,105,366,369,398,407,1204 'known-issu':104,365 'let':294,313,330,533,603,659,662,666,692,820,882,922,993,998,1036,1043,1071,1134,1137,1342,1403,1440 'level':857 'lifecycl':436 'light':582,595,597 'like':311 'limit':232,1085,1280,1295 'line':758 'link':1262 'loginservice.login':1149 'longrunningimport':1287 'main':1145 'mainactor':1612,1617 'mainactor-depend':1611 'mark':371,1188 'may':421 'member':713 'migrat':6,209,1255 'minut':229,1284 'miss':1540 'mistak':147,150,1483 'mix':1576 'mock':31,440,1661 'mockhttpclient':997 'model':452 'modern':46 'multipl':567,1157 'mutabl':1524,1671 'n':561,565 'name':179,185,200,839,920,1409,1452,1632 'name.isempty':256 'network':237,722,792,1217 'networkcallcomplet':1068 'networkmonitor.shared.isconnected':1212 'new':61,1621 'nil':218,1143,1240 'non':955,1591 'non-crit':954 'non-send':1590 'not-an-email':277 'notifi':417 'notificationcenter.default':1136 'notificationpost':1116 'number':1110 'object':469,1142 'observ':1138,1155 'occur':1107 'ok':628 'one':504,1582 'oper':817,1680 'option':326 'organ':96,101,355,361,477 'output':940 'overlay':1422 'page':468 'pair':617 'paramet':568 'parameter':19,112,117,478,1649 'parameterized-tests-in-depth':116 'pass':485,1153,1190 'password':1152 'path':465,660,670,675,952,1499,1509,1639 'pattern':108,111,134,138,363,425,460,975,1683 'per':506 'perform':70,470,949,1334 'plan':30,754,797 'posit':552 'post':1131 'preconditionfailur':1464 'prefer':55 'prevent':1057 'price':841 'privat':1023 'problem':420 'process':964,1168 'processexitswith':1477 'processinfo.processinfo.environment':216,1238 'processinvalidinput':1479 'processor.onitemcomplete':1173 'processor.process':1177 'produc':573 'product':517,576,620,838 'programmat':1182 'progress':211 'propan':383 'properti':654 'protocol':445,1664 'protocol-bas':444 'providescop':1328 'queri':1547 'queue':1144 'quick1':1307 'quick2':1310 'rang':545 'reason':1248 'record':247,306,410,413,917,934,1196,1411,1454 'refer':166,167,226,1261,1681 'references/testing-advanced.md':1692,1693 'references/testing-patterns.md':357,358,427,428,1392,1393,1466,1467,1684,1685 'regress':950 'reli':1548 'renderedchart':1437 'renderer.image':1442 'repetit':1653 'replac':1095,1098 'report':1404 'report.data':1408 'report.isvalid':1413 'report.json':1410 'requir':17,88,92,244,305,316,324,333,339,536 'requiresnetwork':1209 'resolv':423 'respons':693 'response.statuscode':699 'result':253,1072,1387 'result.isempty':1077 'return':300,302,681 'reusabl':1315 'review':161,164,1618 'review-checklist':163 'rule':337 'run':493,503,592,748,827 'second':239,1065,1301 'see':356,426,1391,1465 'self':723,728,733,738,743,1357,1362 'sendabl':487,513,658,1336,1592,1603 'separ':1587 'server':208,1254 'servic':994 'service.fetchprofile':1002 'service.isreachable':396 'set':1024,1530 'setup':826,858,864 'setup/teardown':438 'sever':932,971 'share':1523,1595,1605,1670 'shop':815 'shoppingcart':822,836 'shoppingcarttest':819 'skill' 'skill-swift-testing' 'skip':1218 'sleep':1520,1553 'slow':732,1660 'small':554 'smoke':742,805 'snapshot':36,73,472 'snapshotconfig':605 'snapshottest':587 'sourc':569 'source-dpearson2699' 'specif':283,781 'stage':516 'state':1017,1525,1534,1672 'static':653,665,712,720,725,730,735,740,1359 'status':683 'stop':309,1184 'string':511,538,589,591,637,661 'struct':656,818,880,897,1303,1322 'subclass':1666 'subsequ':341 'suit':15,93,98,123,129,352,360,703,809,810,814,833,856,877,898,1298,1299,1538 'suite-and-test-organ':97 'suite-level':855 'suitetrait':1325 'support':1568 'surfac':937 'swift':2,10,40,42,50,53,170,194,245,381,411,499,548,579,621,655,716,773,786,788,813,876,962,987,1020,1062,1113,1206,1230,1281,1321,1397,1430,1470,1579,1624 'swift-test':1 'synchron':895 'syntax':763,783 'tag':22,121,127,202,205,236,701,707,710,715,718,719,724,729,734,739,747,749,760,778,791,800,878,1655 'tag-bas':759 'tags-and-suites-in-depth':126 'tank':384 'target':970 'task':1348,1569 'task.sleep':1648 'teardown':860,868,904 'tes':39 'test':3,7,11,14,20,21,27,29,32,37,41,43,47,63,69,74,77,80,81,84,95,100,113,118,133,137,151,154,157,160,169,172,173,192,195,201,206,213,220,227,233,310,354,379,412,435,442,453,466,471,473,475,479,482,497,518,549,580,622,679,745,750,753,789,796,806,830,843,849,909,921,939,946,974,976,979,988,1008,1032,1053,1058,1063,1081,1114,1151,1159,1186,1194,1207,1220,1221,1235,1249,1263,1268,1282,1305,1308,1319,1330,1331,1366,1374,1380,1386,1398,1425,1432,1435,1456,1457,1471,1485,1489,1500,1506,1513,1527,1529,1545,1555,1564,1580,1593,1597,1599,1608,1614,1622,1625,1626,1631,1642,1644,1650,1674,1676,1682,1687 'test-attach':153 'test-trait':83 'test.cancel':1215 'test.case':1333 'testabl':34,449 'testcas':667,1332 'testdatabas':884 'testdatabase.createtemporary':891 'testdatabase.setup':1346 'testfetchus':1637 'testscop':433,874,906,1326 'testtrait':1324 'throw':272,290,532,691,887,913,985,992,1070,1118,1163,1210,1244,1259,1278,1289,1338,1341,1379,1402,1439,1505,1508 'time':231,1084,1112,1279,1294 'timelimit':228,238,1055,1064,1283,1300 'timeout':234,1050,1092,1274 'took':965 'tool':780 'toolchain':766 'tooling-specif':779 'topic-accessibility' 'topic-agent-skills' 'topic-ai-coding' 'topic-apple' 'topic-claude-code' 'topic-codex-skills' 'topic-cursor-skills' 'topic-ios' 'topic-ios-development' 'topic-liquid-glass' 'topic-localization' 'topic-mapkit' 'totalpric':851 'track':961 'tracker':1267 'trait':23,82,85,139,143,193,875,907,1225,1229,1312,1316,1355,1369 'traits-in-depth':142 'tri':274,287,315,332,535,694,889,914,924,1000,1073,1127,1164,1214,1290,1344,1351,1405 'truck.grill.isheating':388 'true':394,1449 'two':570 'type':269,1601,1668 'ui':26,68,1428,1544 'uikit':1434 'unit':62 'unwrap':327 'updat':176 'updatedisplaynam':181 'url':520,534,537 'url.scheme':543 'usag':1364 'use':8,64,338,347,612,651,861,872,900,905,947,1054,1514,1552,1556,1623,1645,1651 'user':174,183,184,314,999,1150 'user.name':187,190,322,1006 'userdidlogin':1130,1141 'userservic':995 'valid':196,203,275,288,522 'validationerror':298 'validationerror.self':273 'valu':285,346,508,1026,1030,1044,1048 'var':182,721,726,731,736,741,1025,1360 'vari':764 'variat':1654 'verifi':767,782,1103,1571 'version':774,787 'via':1418,1535 'view':451 'void':1339 'vs':807 'waitforexpect':1101 'want':959 'warn':931,972,1688 'warning-sever':930 'widget':840 'withknownissu':24,382,392,400,1561 'without':1187 'work':893 'write':4 'xcode':51,752,794 'xctest':25,58,65,1577,1629 'xctestexpect':1096,1099 'xctunwrap':312 'xcuitest':28,467,1546 'zip':613,624","prices":[{"id":"47a97ab9-bccf-42bb-939a-1724efc9ce72","listingId":"f2e6cd64-2573-4961-89a5-158475100c14","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"dpearson2699","category":"swift-ios-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T20:33:43.158Z"}],"sources":[{"listingId":"f2e6cd64-2573-4961-89a5-158475100c14","source":"github","sourceId":"dpearson2699/swift-ios-skills/swift-testing","sourceUrl":"https://github.com/dpearson2699/swift-ios-skills/tree/main/skills/swift-testing","isPrimary":false,"firstSeenAt":"2026-04-18T22:01:21.982Z","lastSeenAt":"2026-04-22T06:53:45.999Z"},{"listingId":"f2e6cd64-2573-4961-89a5-158475100c14","source":"skills_sh","sourceId":"dpearson2699/swift-ios-skills/swift-testing","sourceUrl":"https://skills.sh/dpearson2699/swift-ios-skills/swift-testing","isPrimary":true,"firstSeenAt":"2026-04-18T20:33:43.158Z","lastSeenAt":"2026-04-22T06:40:33.077Z"}],"details":{"listingId":"f2e6cd64-2573-4961-89a5-158475100c14","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"dpearson2699","slug":"swift-testing","github":{"repo":"dpearson2699/swift-ios-skills","stars":468,"topics":["accessibility","agent-skills","ai-coding","apple","claude-code","codex-skills","cursor-skills","ios","ios-development","liquid-glass","localization","mapkit","networking","storekit","swift","swift-concurrency","swiftdata","swiftui","widgetkit","xcode"],"license":"other","html_url":"https://github.com/dpearson2699/swift-ios-skills","pushed_at":"2026-04-21T19:26:16Z","description":"Agent Skills for iOS 26+, Swift 6.3, SwiftUI, and modern Apple frameworks","skill_md_sha":"ccb585f98cc2c5957fb605493bbc8b9ee17f95d7","skill_md_path":"skills/swift-testing/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/dpearson2699/swift-ios-skills/tree/main/skills/swift-testing"},"layout":"multi","source":"github","category":"swift-ios-skills","frontmatter":{"name":"swift-testing","description":"Write and migrate tests using the Swift Testing framework with @Test, @Suite, #expect, #require, confirmation, parameterized tests, test tags, traits, withKnownIssue, XCTest UI testing, XCUITest, test plan, mocking, test doubles, testable architecture, snapshot testing, async test patterns, test organization, and test-driven development in Swift. Use when writing or migrating tests with Swift Testing framework, implementing parameterized tests, working with test traits, converting XCTest to Swift Testing, or setting up test organization and mocking patterns."},"skills_sh_url":"https://skills.sh/dpearson2699/swift-ios-skills/swift-testing"},"updatedAt":"2026-04-22T06:53:45.999Z"}}