Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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 this skill ↓86% 95%+9 ptsof test cases passed
Passed 21 of 22 test cases with the skill, and 19 of 22 without it.
An engineer added `@available(iOS 18, *)` to a test suite struct containing ten test functions. Is this the standard approach for OS-gated tests in Swift testing, or should this be refactored?
Advises against placing available attributes on suite types
3 of 3 safety checks passed
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.mdSkills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.