What problem does it solve?
Writing reliable, maintainable tests for Apple platform apps is fraught with common pitfalls: flaky async tests, mixed assertion frameworks that silently pass or fail, missing error path coverage, and tests that don't actually run or pass before shipping. This Skill eliminates those issues by providing clear, actionable guidance for every stage of the Apple platform testing workflow.
Core Features & Use Cases
- F.I.R.S.T-Compliant Test Design: Enforces fast, isolated, repeatable, self-validating, and thorough test principles to catch bugs early and avoid false confidence.
- Framework Selection & Migration Guidance: Clear rules for when to use Swift Testing (new unit/integration tests) vs XCTest (UI, performance, legacy code), plus a step-by-step workflow for migrating existing XCTest suites to Swift Testing.
- Anti-Pattern Detection & Audit Workflows: Pre-built checklists and grep scripts to identify critical testing mistakes (like
wait(for:) in async tests or real network calls in unit tests), plus structured audit processes to measure test coverage and quality.
- Use Case Example: A developer writing tests for an async SwiftUI ViewModel can use this Skill to avoid common mistakes like missing
@MainActor annotations on test suites, mixing XCTAssert inside @Test functions, or forgetting to add cancellation tests for async methods.
Quick Start
Use the ios-testing skill to write a complete, F.I.R.S.T-compliant test suite for your async iOS ViewModel that covers success, failure, and cancellation paths, then run the suite locally to verify all tests pass before committing to your repository.