返回顶部
n

native_automation原生自动化测试

Apple Native Automation & Testing Skill

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
104
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

native_automation

原生自动化技能

理念:将苹果第一方工具(XCTest、XCUITest、Instruments)作为质量保障的权威来源。

能力

  1. 1. 单元测试逻辑:快速、独立的逻辑验证。
  2. UI测试:端到端的用户流程验证。
  3. 快照测试:视觉回归测试。
  4. 性能测试:XCTMetric验证。
  5. 无障碍测试:通过XCUITest自动审计。
  6. 核心流程验证:集成的关键路径测试(输入 -> 处理 -> 连接)。

使用方法

1. 通过脚本执行测试

始终使用包装脚本以确保正确的方案和目标设置。

bash
./tools/runnativetests.sh [模式]

模式:

  • - unit:仅运行单元测试(逻辑层)。
  • ui:仅运行UI测试(交互层)。
  • fast:运行单元测试 + 关键UI路径。
  • full:运行所有测试(包括性能和快照)。

2. 编写测试

  • - 单元测试:继承自XCTestCase。使用XCTAssert...。
  • UI测试:继承自XCTestCase。使用XCUIApplication。
  • 性能测试:使用measure(metrics:options:block:)。

最佳实践

  • - 隔离性:在每个UI测试前重置状态(app.launchArguments += [-reset])。
  • 无障碍:优先使用app.buttons[identifier]而非静态文本。
  • 并发性:对异步代码使用XCTestExpectation。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 native-automation-1776022981 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 native-automation-1776022981 技能

通过命令行安装

skillhub install native-automation-1776022981

下载

⬇ 下载 native_automation v1.0.0(免费)

文件大小: 1.49 KB | 发布时间: 2026-4-13 11:10

v1.0.0 最新 2026-4-13 11:10
Initial release of the Native Automation Skill.

- Provides a unified approach to Apple platform testing using first-party tools (XCTest, XCUITest, Instruments).
- Supports unit, UI, snapshot, performance, and accessibility testing for iOS and macOS projects.
- Introduces script-based test execution with multiple testing modes (unit, ui, fast, full).
- Documents best practices for isolation, accessibility, and concurrency in tests.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部