axiom-ios-testing by charleswiltgen/axiom
npx skills add https://github.com/charleswiltgen/axiom --skill axiom-ios-testing对于任何与测试相关的问题,包括编写测试、调试测试失败、加速测试或选择测试方法,您必须使用此技能。
遇到以下情况时使用此路由器:
此路由器根据具体的测试需求调用专门的技能:
触发条件:
@Test, #expect, #require, @Suite)withMainSerialExecutor, 广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
TestClockswift test)为何选择 swift-testing:现代化的 Swift Testing 框架,支持并行执行、更好的异步支持,并且能够在不启动模拟器的情况下运行。
调用方式:阅读 axiom-swift-testing 技能
触发条件:
sleep() 或任意超时为何选择 ui-testing:XCUITest 需要模拟器,并且有独特的可靠性模式。
调用方式:阅读 axiom-ui-testing 技能
触发条件:
await confirmation@MainActor@Suite 中的共享可变状态为何选择 test-failure-analyzer:专门用于扫描导致 Swift Testing 中间歇性失败模式的代理。
调用方式:启动 test-failure-analyzer 代理
触发条件:
confirmation (Swift Testing)expectedCount@MainActor @Test 测试 MainActor 代码为何选择 testing-async:专门针对 Swift Testing 框架中异步代码的模式。
调用方式:阅读 axiom-testing-async 技能
触发条件:
为何选择 xcode-debugging:测试失败源于环境问题,而非测试逻辑。
调用方式:阅读 axiom-xcode-debugging 技能
触发条件:
为何选择 test-runner:专门用于命令行测试执行并解析 xcresulttool 的代理。
调用方式:启动 test-runner 代理
触发条件:
为何选择 test-debugger:自动化的测试运行、分析失败、建议修复和重新运行的循环。
调用方式:启动 test-debugger 代理
触发条件:
为何选择 ui-recording:专注于 Xcode 26 的录制/重放/审查工作流的指南。
调用方式:阅读 axiom-ui-recording 技能
触发条件:
为何选择 testing-auditor:扫描测试中的 sleep() 调用、共享可变状态、缺失的断言、XCTest 到 Swift Testing 的迁移机会以及 Swift 6 并发问题。
调用方式:启动 testing-auditor 代理或使用 /axiom:audit testing
触发条件:
为何选择 simulator-tester + axe-ref:当 XCUITest 不可用时,AXe 提供基于无障碍功能的 UI 自动化。
调用方式:启动 simulator-tester 代理(使用 axiom-axe-ref)
| 需求 | 使用 |
|---|---|
| 单元测试(逻辑、模型) | Swift Testing |
| UI 测试(点击、滑动、断言屏幕) | XCUITest (XCTest) |
| 无需模拟器的测试 | Swift Testing + Package/Framework |
| 参数化测试 | Swift Testing |
| 性能测量 | XCTest (XCTMetric) |
| Objective-C 测试 | XCTest |
| 想法 | 现实 |
|---|---|
| "简单的测试问题,我不需要这个技能" | 正确的模式可以防止测试债务。swift-testing 提供可复制的解决方案。 |
| "我对 XCTest 足够了解" | 对于单元测试,Swift Testing 明显更好。swift-testing 涵盖迁移。 |
| "测试很慢但没关系" | 快速的测试支持 TDD。swift-testing 展示了如何在不使用模拟器的情况下运行。 |
| "我会用 sleep() 修复不稳定的测试" | sleep() 会使测试更慢且更不稳定。ui-testing 提供基于条件的等待模式。 |
| "我稍后再添加测试" | 实现后编写的测试会遗漏边缘情况。swift-testing 使得先编写测试变得容易。 |
用户:"如何在 Swift 中编写单元测试?" → 调用:axiom-swift-testing
用户:"我的 UI 测试在 CI 中不稳定" → 检查代码库:XCUIApplication/XCUIElement 模式? → ui-testing → 检查代码库:@Test/#expect 模式? → test-failure-analyzer
用户:"测试随机失败,有时通过有时失败" → 调用:test-failure-analyzer (代理)
用户:"测试在本地通过但在 CI 中失败" → 调用:test-failure-analyzer (代理)
用户:"如何可靠地测试异步代码?" → 调用:testing-async
用户:"如何使用 Swift Testing 测试基于回调的 API?" → 调用:testing-async
用户:"XCTestExpectation 在 Swift Testing 中的等价物是什么?" → 调用:testing-async
用户:"如何使用带有 expectedCount 的 confirmation?" → 调用:testing-async
用户:"我希望我的测试运行得更快" → 调用:axiom-swift-testing (策略 1: 包提取)
用户:"我的单元测试需要 25 秒才能运行" → 调用:axiom-swift-testing (策略 1: 包提取)
用户:"如何使用 swift test 而不是 xcodebuild test?" → 调用:axiom-swift-testing (快速测试部分)
用户:"我应该使用 Swift Testing 还是 XCTest?" → 调用:axiom-swift-testing (迁移部分) + 此决策树
用户:"测试在任何断言运行前崩溃" → 调用:axiom-xcode-debugging
用户:"运行我的测试并告诉我什么失败了" → 调用:test-runner (代理)
用户:"帮我修复这些失败的测试" → 调用:test-debugger (代理)
用户:"解析我上次测试运行的 xcresult" → 调用:test-runner (代理)
用户:"从我的测试中导出失败截图" → 调用:test-runner (代理)
用户:"如何在 Xcode 26 中录制 UI 自动化?" → 调用:axiom-ui-recording
用户:"如何为多语言测试使用测试计划?" → 调用:axiom-ui-recording
用户:"我可以在不编写 XCUITests 的情况下自动化我的应用吗?" → 调用:simulator-tester (代理) + axiom-axe-ref
用户:"如何使用 AXe 点击按钮?" → 调用:axiom-axe-ref (通过 simulator-tester)
用户:"审计我的测试以查找质量问题" → 调用:testing-auditor 代理
用户:"我应该迁移到 Swift Testing 吗?" → 调用:testing-auditor 代理
每周安装量
145
仓库
GitHub 星标数
610
首次出现
2026 年 1 月 21 日
安全审计
安装于
opencode122
codex118
claude-code113
gemini-cli112
cursor107
github-copilot103
You MUST use this skill for ANY testing-related question, including writing tests, debugging test failures, making tests faster, or choosing between testing approaches.
Use this router when you encounter:
This router invokes specialized skills based on the specific testing need:
Triggers :
@Test, #expect, #require, @Suite)withMainSerialExecutor, TestClockswift 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
Triggers :
sleep() or arbitrary timeoutsWhy ui-testing : XCUITest requires simulator and has unique patterns for reliability.
Invoke : Read the axiom-ui-testing skill
Triggers :
await confirmation for async callbacks@MainActor on UI tests@SuiteWhy test-failure-analyzer : Specialized agent that scans for patterns causing intermittent failures in Swift Testing.
Invoke : Launch test-failure-analyzer agent
Triggers :
confirmation for callbacks (Swift Testing)expectedCount for multiple callbacks@MainActor @TestWhy testing-async : Dedicated patterns for async code in Swift Testing framework.
Invoke : Read the axiom-testing-async skill
Triggers :
Why xcode-debugging : Test failures from environment issues, not test logic.
Invoke : Read the axiom-xcode-debugging skill
Triggers :
Why test-runner : Specialized agent for command-line test execution with xcresulttool parsing.
Invoke : Launch test-runner agent
Triggers :
Why test-debugger : Automated cycle of running tests, analyzing failures, suggesting fixes, and re-running.
Invoke : Launch test-debugger agent
Triggers :
Why ui-recording : Focused guide for Xcode 26's Record/Replay/Review workflow.
Invoke : Read the axiom-ui-recording skill
Triggers :
Why testing-auditor : Scans for sleep() calls, shared mutable state, missing assertions, XCTest to Swift Testing migration opportunities, and Swift 6 concurrency issues in tests.
Invoke : Launch testing-auditor agent or /axiom:audit testing
Triggers :
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)
| 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 |
| Thought | Reality |
|---|---|
| "Simple test question, I don't need the skill" | Proper patterns prevent test debt. swift-testing has copy-paste solutions. |
| "I know XCTest well enough" | Swift Testing is significantly better for unit tests. swift-testing covers migration. |
| "Tests are slow but it's fine" | Fast tests enable TDD. swift-testing shows how to run without simulator. |
| "I'll fix the flaky test with a sleep()" | sleep() makes tests slower AND flakier. ui-testing has condition-based waiting patterns. |
| "I'll add tests later" | Tests written after implementation miss edge cases. swift-testing makes writing tests first easy. |
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 (Strategy 1: Package extraction)
User: "My unit tests take 25 seconds to run" → Invoke: axiom-swift-testing (Strategy 1: Package extraction)
User: "How do I use swift test instead of xcodebuild test?" → 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)
User: "Audit my tests for quality issues" → Invoke: testing-auditor agent
User: "Should I migrate to Swift Testing?" → Invoke: testing-auditor agent
Weekly Installs
145
Repository
GitHub Stars
610
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode122
codex118
claude-code113
gemini-cli112
cursor107
github-copilot103
测试策略完整指南:单元/集成/E2E测试金字塔与自动化实践
11,200 周安装
Database Expert - Claude AI数据库专家技能,提升数据库开发与管理效率
70 周安装
Next.js 核心最佳实践指南:应用路由器、服务器组件与数据获取优化
115 周安装
Python货币转换器 - 支持150+货币汇率转换、批量处理与CSV格式化
111 周安装
Inertia Rails TypeScript 配置指南:实现类型安全的共享属性与闪存数据
70 周安装
Terraform工程师:基础设施即代码(IaC)专家,自动化云资源供应与管理
112 周安装
AI工程师技能指南:大语言模型集成、RAG架构、向量数据库与生产部署全流程
112 周安装