Expert guidance for Swift Testing: test structure, #expect/#require macros, traits and tags, parameterized tests, test plans, parallel execution, async waiting patterns, and XCTest migration. Use when writing new Swift tests, modernizing XCTest suites, debugging flaky tests, or improving test quality and maintainability in Apple-platform or Swift server projects.
94
92%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
Use this skill to write, review, migrate, and debug Swift tests with modern Swift Testing APIs. Prioritize readable tests, robust parallel execution, clear diagnostics, and incremental migration from XCTest where needed.
XCUIApplication), performance metrics (XCTMetric), and Objective-C-only test code.#expect as the default assertion and use #require when subsequent lines depend on a prerequisite value..serialized..enabled, .disabled, .timeLimit, .bug, tags) over naming conventions or ad-hoc comments.@available on test functions for OS-gated behavior instead of runtime #available checks inside test bodies; never annotate suite types with @available.Testing in test targets, never in app/library/binary targets.references/fundamentals.md#expect, #require, and throw expectations -> references/expectations.mdreferences/traits-and-tags.mdreferences/parameterized-testing.md.serialized, isolation strategy -> references/parallelization-and-isolation.mdreferences/performance-and-best-practices.mdreferences/async-testing-and-waiting.mdreferences/migration-from-xctest.mdreferences/xcode-workflows.mdreferences/_index.mdtestFooCaseA/testFooCaseB/... methods -> replace with one parameterized @Test(arguments:).try #require(...) then assert on unwrapped value..serialized only as a transition step.withKnownIssue for temporary known failures to preserve signal.CustomTestStringConvertible for focused test diagnostics.#require where failure should stop the test.references/_index.mdreferences/fundamentals.mdreferences/expectations.mdreferences/traits-and-tags.mdreferences/parameterized-testing.mdreferences/parallelization-and-isolation.mdreferences/performance-and-best-practices.mdreferences/async-testing-and-waiting.mdreferences/migration-from-xctest.mdreferences/xcode-workflows.md798e9b1
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.