Design & UI v1.0.0

native-automation

Apple Native Automation & Testing Skill

soponcd 更新于 2026-03-25 1 浏览
下载 SKILL

技能说明

Apple Native Automation & Testing Skill

使用场景

Philosophy: Use Apple's first-party tools (XCTest, XCUITest, Instruments) as the source of truth for quality.

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

帮我下载并安装这个SKILL:https://skillhub.cstcloud.cn/download/native-automation
  1. 点击上方「下载 SKILL」按钮,获取技能压缩包。
  2. 将压缩包解压到你的 Agent 技能目录。
  3. 重启客户端后即可在技能列表中选择该技能。

技能文件内容

4 个文件 · 17 kB
SKILL.md text/markdown
---
name: native_automation
description: Apple Native Automation & Testing Skill
version: 1.0.0
domain: ios-macos
homepage: https://github.com/soponcd/timeflow-skills/tree/main/teams/skills/native_automation
metadata:
  clawdbot:
    emoji: 🤖
---

# Native Automation Skill

> **Philosophy**: Use Apple's first-party tools (XCTest, XCUITest, Instruments) as the source of truth for quality.

## Capabilities

1.  **Unit Testing Logic**: fast, isolated logic verification.
2.  **UI Testing**: End-to-end user flow verification.
3.  **Snapshot Testing**: Visual regression testing.
4.  **Performance Testing**: XCTMetric verification.
5.  **Accessibility Testing**: Automated audit via XCUITest.
6.  **Hero Flow Verification**: Integrated critical path testing (Input -> Process -> Connect).

## Usage

### 1. Execute Tests via Script
Always use the wrapper script to ensure correct scheme and destination settings.

```bash
./tools/run_native_tests.sh [mode]
```

**Modes:**
- `unit`: Run unit tests only (Logic layer).
- `ui`: Run UI tests only (Interaction layer).
- `fast`: Run unit + critical UI paths.
- `full`: Run ALL tests (including performance and snapshots).

### 2. Writing Tests
- **Unit**: Inherit from `XCTestCase`. Use `XCTAssert...`.
- **UI**: Inherit from `XCTestCase`. Use `XCUIApplication`.
- **Performance**: Use `measure(metrics:options:block:)`.

## Best Practices
- **Isolation**: Reset state before each UI test (`app.launchArguments += ["-reset"]`).
- **Accessibility**: Use `app.buttons["identifier"]` over static texts.
- **Concurrency**: Use `XCTestExpectation` for async code.

文件内容直接读取自技能仓库,仅供安装前审阅;以实际下载的压缩包为准。