ios-testing
Skill1 starsChanged 36 days agoMITView on GitHub
Write, run and fix tests for iOS apps — Swift Testing and XCTest unit tests, UI tests, snapshot tests, test plans and CI test runs. Use when the user asks to "add tests", "why is this test failing", "set up UI tests", "improve coverage", or before a release.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- conjure-3301/skillstheir own version, first seen Aug 17, 2026
- rusel95/ios-agent-skillstheir own version, first seen Apr 16, 2026
- jx1100370217/my-openclaw-skillstheir own version, first seen Feb 3, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- rusel95/ios-agent-skills★ 13same name
- jx1100370217/my-openclaw-skills★ 4same name
- conjure-3301/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository15 other files it gives its agents.
- app-store-listingSkill
- ios-app-intentsSkill
- ios-crash-monitoring-sentrySkill
- ios-debugger-agentSkill
- ios-ettrace-performanceSkill
- ios-lifecycleSkill
- ios-memgraph-leaksSkill
- ios-monetizationSkill
- ios-post-launchSkill
- ios-project-setupSkill
- ios-releaseSkill
- swiftui-liquid-glassSkill
- swiftui-performance-auditSkill
- swiftui-ui-patternsSkill
- swiftui-view-refactorSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
Keep views thin. Put decisions in @Observable models and test those.
- Very specific: line 23
Use launch arguments (e.g.
- Distinctive: line 30
Don't weaken an assertion just to make a test pass.
- Distinctive: line 34
Run the full suite on the oldest supported iOS version and on the newest one.
- Very specific: line 38
Use an .xctestplan when there are several configurations (locales, UI-test vs unit).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
iOS Testing
Choose the right test
| Need | Use |
| Logic, models, view models, parsing | Swift Testing (import Testing, @Test, #expect) for new code; keep existing XCTest suites as they are |
| Async code | async test functions; confirmation { } for callbacks; avoid sleeps |
| User flows (onboarding, purchase, settings) | XCUITest with accessibility identifiers |
| Visual regressions | A snapshot library the project already uses (e.g. swift-snapshot-testing); don't add one without asking |
| Performance budgets | XCTMetric / measure(metrics:) in XCTest |
Write testable code first
- Inject dependencies (network client, clock, persistence) through initializers or environment values so tests can pass fakes.
- Keep views thin. Put decisions in
@Observablemodels and test those. - Give every interactive element in a UI flow a stable
.accessibilityIdentifier. - Use launch arguments (e.g.
-uiTesting,-resetState) to put the app in a known state for UI tests, and stub the network in that mode.
Run tests
- On the Mac:
xcodebuild test -scheme <Scheme> -destination 'platform=iOS Simulator,name=<device>' [-only-testing:<Target>/<Suite>/<test>]. - In Cowork: use the XcodeBuildMCP test tools.
- For a failing test, rerun just that test, read the failure and the
.xcresultif it's available (xcrun xcresulttool get test-results summary --path <path>), fix the cause, rerun, then rerun the whole suite. - Don't weaken an assertion just to make a test pass. If the test itself is wrong, explain why before changing it.
Before a release
Run the full suite on the oldest supported iOS version and on the newest one. Report pass/fail counts and any flaky tests (a test that passes when retried is still a bug — log it).
Test plans and CI
- Use an
.xctestplanwhen there are several configurations (locales, UI-test vs unit). - In CI, add
-resultBundlePathand upload the.xcresultas an artifact when something fails.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

