axiom-ios-testing
npx skills add https://github.com/fotescodev/ios-agent-skills --skill axiom-ios-testing
Agent 安装分布
Skill 文档
iOS Testing Router
You MUST use this skill for ANY testing-related question, including writing tests, debugging test failures, making tests faster, or choosing between testing approaches.
When to Use
Use this router when you encounter:
- Writing new unit tests or UI tests
- Swift Testing framework (@Test, #expect, @Suite)
- XCTest or XCUITest questions
- Making tests run faster (without simulator)
- Flaky tests (pass sometimes, fail sometimes)
- Testing async code reliably
- Migrating from XCTest to Swift Testing
- Test architecture decisions
- Condition-based waiting patterns
Routing Logic
This router invokes specialized skills based on the specific testing need:
1. Unit Tests / Fast Tests â swift-testing
Triggers:
- Writing new unit tests
- Swift Testing framework (
@Test,#expect,#require,@Suite) - Making tests run without simulator
- Testing async code reliably
withMainSerialExecutor,TestClock- Migrating from XCTest
- Parameterized tests
- Tags and traits
- Host Application: None configuration
- Swift Package tests (
swift test)
Why swift-testing: Modern Swift Testing framework with parallel execution, better async support, and the ability to run without launching simulator.
Invoke: Read the axiom-swift-testing skill
2. UI Tests / XCUITest â ui-testing
Triggers:
- Recording UI Automation (Xcode 26)
- XCUIApplication, XCUIElement
- Flaky UI tests
- Tests pass locally, fail in CI
sleep()or arbitrary timeouts- Condition-based waiting
- Cross-device testing
- Accessibility-first testing
Why ui-testing: XCUITest requires simulator and has unique patterns for reliability.
Invoke: Read the axiom-ui-testing skill
3. Flaky Tests / Race Conditions â test-failure-analyzer (Agent)
Triggers:
- Tests fail randomly in CI
- Tests pass locally but fail in CI
- Flaky tests (pass sometimes, fail sometimes)
- Race conditions in Swift Testing
- Missing
await confirmationfor async callbacks - Missing
@MainActoron UI tests - Shared mutable state in
@Suite - Tests pass individually, fail when run together
Why test-failure-analyzer: Specialized agent that scans for patterns causing intermittent failures in Swift Testing.
Invoke: Launch test-failure-analyzer agent
4. Async Testing Patterns â testing-async
Triggers:
- Testing async/await functions
confirmationfor callbacks (Swift Testing)expectedCountfor multiple callbacks- Testing MainActor code with
@MainActor @Test - Migrating XCTestExpectation â confirmation
- Parallel test execution concerns
- Test timeout configuration
Why testing-async: Dedicated patterns for async code in Swift Testing framework.
Invoke: Read the axiom-testing-async skill
5. Test Crashes / Environment Issues â xcode-debugging
Triggers:
- Tests crash before assertions run
- Simulator won’t boot for tests
- Tests hang indefinitely
- “Unable to boot simulator” errors
- Clean test run differs from incremental
Why xcode-debugging: Test failures from environment issues, not test logic.
Invoke: Read the axiom-xcode-debugging skill
6. Running XCUITests from Command Line â test-runner (Agent)
Triggers:
- Run tests with xcodebuild
- Parse xcresult bundles
- Export failure screenshots/videos
- Code coverage reports
- CI/CD test execution
Why test-runner: Specialized agent for command-line test execution with xcresulttool parsing.
Invoke: Launch test-runner agent
7. Closed-Loop Test Debugging â test-debugger (Agent)
Triggers:
- Fix failing tests automatically
- Debug persistent test failures
- Run â analyze â fix â verify cycle
- Need to iterate until tests pass
- Analyze failure screenshots
Why test-debugger: Automated cycle of running tests, analyzing failures, suggesting fixes, and re-running.
Invoke: Launch test-debugger agent
8. Recording UI Automation (Xcode 26) â ui-recording
Triggers:
- Record user interactions in Xcode
- Test plans for multi-config replay
- Video review of test runs
- Xcode 26 recording workflow
- Enhancing recorded test code
Why ui-recording: Focused guide for Xcode 26’s Record/Replay/Review workflow.
Invoke: Read the axiom-ui-recording skill
9. UI Automation Without XCUITest â simulator-tester + axe-ref
Triggers:
- Automate app without test target
- AXe CLI usage (tap, swipe, type)
- describe-ui for accessibility tree
- Quick automation outside XCUITest
- Scripted simulator interactions
Why simulator-tester + axe-ref: AXe provides accessibility-based UI automation when XCUITest isn’t available.
Invoke: Launch simulator-tester agent (uses axiom-axe-ref)
Decision Tree
User has testing question
â
ââ Writing unit tests or asking about Swift Testing?
â ââ YES â swift-testing
â
ââ Writing UI tests or debugging XCUITest?
â ââ YES â ui-testing
â
ââ Testing async/await code patterns?
â ââ confirmation, expectedCount, @MainActor @Test? â testing-async
â ââ General async questions? â testing-async
â
ââ Tests fail randomly / flaky in CI / race conditions?
â ââ Check: Uses XCUIApplication/XCUIElement? â ui-testing
â ââ Check: Uses @Test/#expect? â test-failure-analyzer (Agent)
â
ââ Tests crash or environment seems wrong?
â ââ YES â xcode-debugging (via ios-build)
â
ââ Tests are slow, want to speed them up?
â ââ YES â swift-testing (Fast Tests section)
â
ââ Run tests from command line / CI / parse results?
â ââ YES â test-runner (Agent)
â
ââ Fix failing tests automatically / closed-loop debugging?
â ââ YES â test-debugger (Agent)
â
ââ Record UI interactions in Xcode 26?
â ââ YES â ui-recording
â
ââ Automate without XCUITest / use AXe CLI?
ââ YES â simulator-tester + axe-ref
Swift Testing vs XCTest Quick Guide
| Need | Use |
|---|---|
| Unit tests (logic, models) | Swift Testing |
| UI tests (tap, swipe, assert screens) | XCUITest (XCTest) |
| Tests without simulator | Swift Testing + Package/Framework |
| Parameterized tests | Swift Testing |
| Performance measurements | XCTest (XCTMetric) |
| Objective-C tests | XCTest |
Anti-Rationalization
Do NOT skip this router for:
- “Simple” test questions (proper patterns prevent future pain)
- “I know XCTest” (Swift Testing is significantly better for unit tests)
- “Tests are slow but it’s fine” (fast tests enable TDD and better feedback)
Fast, reliable tests are foundational to code quality.
Example Invocations
User: “How do I write a unit test in Swift?” â Invoke: axiom-swift-testing
User: “My UI tests are flaky in CI” â Check codebase: XCUIApplication/XCUIElement patterns? â ui-testing â Check codebase: @Test/#expect patterns? â test-failure-analyzer
User: “Tests fail randomly, pass sometimes fail sometimes” â Invoke: test-failure-analyzer (Agent)
User: “Tests pass locally but fail in CI” â Invoke: test-failure-analyzer (Agent)
User: “How do I test async code without flakiness?” â Invoke: testing-async
User: “How do I test callback-based APIs with Swift Testing?” â Invoke: testing-async
User: “What’s the Swift Testing equivalent of XCTestExpectation?” â Invoke: testing-async
User: “How do I use confirmation with expectedCount?” â Invoke: testing-async
User: “I want my tests to run faster” â Invoke: axiom-swift-testing (Fast Tests section)
User: “Should I use Swift Testing or XCTest?” â Invoke: axiom-swift-testing (Migration section) + this decision tree
User: “Tests crash before any assertions” â Invoke: axiom-xcode-debugging
User: “Run my tests and show me what failed” â Invoke: test-runner (Agent)
User: “Help me fix these failing tests” â Invoke: test-debugger (Agent)
User: “Parse the xcresult from my last test run” â Invoke: test-runner (Agent)
User: “Export failure screenshots from my tests” â Invoke: test-runner (Agent)
User: “How do I record UI automation in Xcode 26?” â Invoke: axiom-ui-recording
User: “How do I use test plans for multi-language testing?” â Invoke: axiom-ui-recording
User: “Can I automate my app without writing XCUITests?” â Invoke: simulator-tester (Agent) + axiom-axe-ref
User: “How do I tap a button using AXe?” â Invoke: axiom-axe-ref (via simulator-tester)