mcpField
I
ios-testing

ios-testing

github.com/pproencaTesting & quality218278 installsUpdated 11w ago
Repository

About ios-testing

A reference skill for designing and writing tests for iOS and Swift applications, organized as prioritized rules across eight categories. It is aimed at developers working on test architecture, unit and UI tests, concurrency, snapshots, and CI within the stated modular MVVM-C contract.

Key features

  1. 0144 prioritized rules across eight categories
  2. 02Test architecture and unit testing guidance
  3. 03Mocks, stubs, and fake isolation patterns
  4. 04Async and concurrency testing practices
  5. 05SwiftUI, UI, and snapshot testing guidance
  6. 06CI reliability and execution recommendations

Use cases

  1. 01Designing testable dependencies and test targets
  2. 02Writing unit tests for async Swift code
  3. 03Testing SwiftUI models, bindings, and user journeys
  4. 04Configuring snapshot suites and CI execution

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/pproenca/dot-skills --skill ios-testing

After installing, type/ios-testingin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

metadata.json
assets/templates/
_template.md
references/
_sections.md
arch-arrange-act-assert.md
arch-constructor-injection.md
arch-protocol-dependencies.md
arch-single-responsibility-tests.md
arch-test-target-separation.md
arch-testable-import.md
async-actor-testing.md
async-await-directly.md
async-confirmation.md
async-mainactor-isolation.md
async-task-cancellation.md
ci-coverage-thresholds.md
ci-deterministic-test-data.md
ci-flaky-test-quarantine.md
ci-parallel-execution.md
ci-test-plans.md
mock-avoid-over-mocking.md
mock-dependency-container.md
mock-fake-for-integration.md
mock-protocol-based-mocks.md
mock-spy-for-verification.md
mock-stub-return-values.md
snap-device-matrix.md
snap-inline-snapshots.md
snap-named-references.md
snap-swift-snapshot-testing.md
swiftui-binding-testing.md

Details

From the project README

iOS Testing Best Practices

Comprehensive testing guide for iOS and Swift applications, written at principal engineer level. Contains 44 rules across 8 categories, prioritized by impact to guide test architecture decisions, test authoring patterns, and CI infrastructure.

Clinic Architecture Contract (iOS 26 / Swift 6.2)

All guidance in this skill assumes the clinic modular MVVM-C architecture:

  • Feature modules import Domain + DesignSystem only (never Data, never sibling features)
  • App target is the convergence point and owns DependencyContainer, concrete coordinators, and Route Shell wiring
  • Domain stays pure Swift and defines models plus repository, *Coordinating, ErrorRouting, and AppError contracts
  • Data owns SwiftData/network/sync/retry/background I/O and implements Domain protocols
  • Read/write flow defaults to stale-while-revalidate reads and optimistic queued writes
  • ViewModels call repository protocols directly (no default use-case/interactor layer)

When to Apply

Reference these guidelines when:

  • Writing new unit tests or UI tests for iOS apps
  • Designing testable architecture with dependency injection
  • Testing async/await, actors, and Combine publishers
  • Setting up snapshot testing or visual regression suites
  • Configuring CI pipelines, test plans, and parallel execution

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Test Architecture & TestabilityCRITICALarch-
2Unit Testing FundamentalsCRITICALunit-
3Test Doubles & IsolationHIGHmock-
4Async & Concurrency TestingHIGHasync-
5SwiftUI TestingMEDIUM-HIGHswiftui-
6UI & Acceptance TestingMEDIUMui-
7Snapshot & Visual TestingMEDIUMsnap-
8Test Reliability & CILOW-MEDIUMci-

Quick Reference

1. Test Architecture & Testability (CRITICAL)
2. Unit Testing Fundamentals (CRITICAL)
3. Test Doubles & Isolation (HIGH)
4. Async & Concurrency Testing (HIGH)
5. SwiftUI Testing (MEDIUM-HIGH)
6. UI & Acceptance Testing (MEDIUM)
7. Snapshot & Visual Testing (MEDIUM)
8. Test Reliability & CI (LOW-MEDIUM)

How to Use

Read individual reference files for detailed explanations and code examples:

Reference Files

FileDescription
references/_sections.mdCategory definitions and ordering
assets/templates/_template.mdTemplate for new rules
metadata.jsonVersion and reference information

Comments

Markdown supported