swift-testing-expert

Featured

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.

Testing & QA 334 stars 14 forks Updated 6 days ago MIT

Install

View on GitHub

Quality Score: 90/100

Stars 20%
84
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Swift Testing ## Overview 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. ## Agent behavior contract (follow these rules) 1. Prefer Swift Testing for Swift unit and integration tests, but keep XCTest for UI automation (`XCUIApplication`), performance metrics (`XCTMetric`), and Objective-C-only test code. 2. Treat `#expect` as the default assertion and use `#require` when subsequent lines depend on a prerequisite value. 3. Default to parallel-safe guidance. If tests are not isolated, first propose fixing shared state before applying `.serialized`. 4. Prefer traits for behavior and metadata (`.enabled`, `.disabled`, `.timeLimit`, `.bug`, tags) over naming conventions or ad-hoc comments. 5. Recommend parameterized tests when multiple tests share logic and differ only in input values. 6. Use `@available` on test functions for OS-gated behavior instead of runtime `#available` checks inside test bodies; never annotate suite types with `@available`. 7. Keep migration advice incremental: convert assertions first, then organize suites, then introduce parameterization/traits. 8. Only import `Testing` in test targets, never in app/library/binary targets. ## First 60 seconds (triage template) - Clarify the goal: new tests, migration, flaky failures, performance, CI filtering, or async waiting. - Collect minima...

Details

Author
AvdLee
Repository
AvdLee/Swift-Testing-Agent-Skill
Created
2 months ago
Last Updated
6 days ago
Language
N/A
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Testing & QA Solid

playwright-skill

Battle-tested Playwright patterns for E2E, API, component, visual, accessibility, and security testing. Covers locators, fixtures, POM, network mocking, auth flows, debugging, CI/CD (GitHub Actions, GitLab, CircleCI, Azure, Jenkins), framework recipes (React, Next.js, Vue, Angular), and migration guides from Cypress/Selenium. TypeScript and JavaScript.

185 Updated 1 weeks ago
testdino-hq
Testing & QA Listed

unit-testing

Unit testing patterns: Vitest config with v8 coverage, Testing Library behavior testing, MSW for HTTP mocking (vs jest.mock), it.each parametrized tests, spies vs mocks vs stubs, testing async code, snapshot testing guidelines. Use when writing unit and component tests.

11 Updated 1 months ago
rnavarych
AI & Automation Featured

ios-simulator-skill

21 production-ready scripts for iOS app testing, building, and automation. Provides semantic UI navigation, build automation, accessibility testing, and simulator lifecycle management. Optimized for AI agents with minimal token output.

756 Updated 1 months ago
conorluddy
Testing & QA Solid

playwright-core

Battle-tested Playwright patterns for E2E, API, component, visual, accessibility, and security testing. Covers locators, assertions, fixtures, network mocking, auth flows, debugging, and framework recipes for React, Next.js, Vue, and Angular. TypeScript and JavaScript.

185 Updated 1 weeks ago
testdino-hq
Testing & QA Listed

testing-tauri-apps

Guides developers through testing Tauri applications including unit testing with mock runtime, mocking Tauri APIs, WebDriver end-to-end testing with Selenium and WebdriverIO, and CI integration with GitHub Actions.

13 Updated 2 months ago
dchuk