Use this skill when designing, reviewing, or improving automated tests for an iOS feature or codebase, including test boundaries, system-wide tests, test doubles, coverage priorities, volatile code, TDD, and test maintenance.
Use this skill when designing, reviewing, or improving automated tests for an iOS feature or codebase, including test boundaries, system-wide tests, test doubles, coverage priorities, volatile code, TDD, and test maintenance.
Do not use it for general XCTest or Swift Testing syntax unless the task also involves testing strategy or architecture.
Stronger alternatives
This repository is archived — consider an actively maintained alternative.
Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.
Claude CodeNot declared
CursorNot declared
CodexNot declared
GitHub CopilotNot declared
WindsurfNot declared
Gemini CLINot declared
ClineNot declared
OpenCodeNot declared
Repository health
Stars14
LicenseLICENSE
Default branchmain
Open issues0
Status
Archived
Package contents
Files included with this skill beyond the listing page.
skill mdSKILL.md7,337 B
docsSUMMARY.md374 B
History
First seen on skills.sh
First recorded snapshot · 16 installs
SKILL.md
iOS Testing Strategy
Purpose
Use this skill to choose high-value test boundaries, protect meaningful behavior, and avoid test suites that are slow, fragile, or coupled to implementation details.
When to use this skill
Use this skill when the task involves:
deciding what to test and at which level;
unit, integration, system-wide, or cross-domain tests;
excessive mocks, stubs, spies, protocols, or test-only abstractions;
brittle tests that break during refactoring;
coverage priorities or uneven test coverage;
prototypes, volatile features, or rapidly changing architecture;
choosing whether to use TDD;
reducing setup, fixtures, boilerplate, flakiness, or execution time;
choosing between automated and manual verification.
When not to use this skill
Do not use this skill for:
testing framework syntax with no strategy question;
UI automation mechanics with no architectural concern;
performance profiling;
debugging a defect unless the task also asks how to prevent regression.
Core workflow
Define the behavior, invariant, or failure risk that needs protection.
Identify a stable entry point through which the behavior can be exercised.
Choose the broadest boundary that remains fast, deterministic, and diagnosable.
Keep real deterministic domain and application components connected.
Replace only slow, destructive, nondeterministic, or externally controlled boundaries.
trivial forwarding code already covered by a broader scenario.
Treat coverage as a diagnostic signal, not the objective. Allocate testing effort by risk, volatility, and maintenance cost rather than uniformly across modules.
Volatile code and TDD
During exploration, protect critical invariants and risky algorithms without freezing temporary structure.
Add broader regression tests as behavior and boundaries stabilize.
Use TDD when requirements and outcomes are clear enough for tests to guide design.
Do not prescribe TDD for exploratory UI work, architectural spikes, or rapidly changing product flows.
Defer a test only when the accepted risk and alternative validation are explicit.
Assertions and maintainability
Assert returned values, observable state, persisted data, emitted effects, meaningful errors, and recovery behavior.
Avoid assertions about private methods, incidental call order, exact object graphs, or temporary decomposition.
Keep setup close to the behavior under test.
Extract helpers only when they reduce repetition without hiding intent.
Keep fixtures minimal and scenario-specific.
Split slow suites from fast feedback tests rather than weakening all tests.
Gotchas
Extensive mocking may indicate that the test boundary is too narrow.
A broad test is not automatically better if failures are difficult to localize.
Real databases, clocks, networks, and system services can introduce flakiness.
Tests coupled to internal calls may block safe refactoring without protecting behavior.
High coverage can coexist with missing critical scenarios.
Rapid delivery is not itself a reason to skip tests; make the accepted risk explicit.
A test suite developers rarely run provides limited feedback value.
Output expectations
When reviewing a testing strategy, respond with:
The behavior or risk that should be protected.
The recommended test boundary and why.
Which dependencies should remain real and which should be replaced.
The key scenarios and observable assertions.
Trade-offs, maintenance risks, and exceptions.
How and where the tests should run.
When reviewing existing tests, also identify implementation coupling, unnecessary doubles, missing high-risk scenarios, duplicated setup, slow or flaky boundaries, and tests that should be removed, widened, or narrowed.
References
Read these only when relevant:
references/test-boundaries.md — read when choosing between narrow unit tests, feature-level tests, integration tests, and system-wide tests.
references/test-doubles-and-real-dependencies.md — read when choosing real implementations, in-memory components, fakes, stubs, spies, mocks, or protocols.
references/risk-based-test-prioritization.md — read when deciding what to test first, how deeply to test it, or how to distribute effort across domains.
references/volatile-code-and-tdd.md — read when testing prototypes, unstable features, architectural spikes, or deciding whether TDD is appropriate.
references/assertions-and-refactoring-resilience.md — read when tests depend on private methods, call order, interaction counts, or other implementation details.
references/test-suite-maintainability.md — read when reducing fixtures, setup, boilerplate, execution time, flakiness, or CI feedback time.
references/coverage-and-manual-testing.md — read when discussing coverage targets, automation gaps, or the trade-off between automated and manual verification.