Community程式設計與開發github.com

控制介面端對端測試

控制瀏覽器 UI 測試、視覺審查與錄製、互動效能稽核,以及執行檢查器的證據收集。

控制介面端對端測試 是什麼?

此技能為 AI 代理提供一個結構化的端對端 (E2E) 瀏覽器測試框架,用於驗證使用者介面行為。它規定了一個選擇證明、準備測試夾具、執行行為並交付證據的四步驟工作流程。對於版面變更,它包含一個 UI 壓力測試流程;對於外觀變更,則有視覺證明預設流程;另外還有專門的章節處理互動效能稽核(使用 Chrome 追蹤)與執行檢查器證據。此技能與基於 Node.js 的測試工具(如 Vitest)整合,並在 `control-ui-e2e.ts` 中使用合成閘道資料來模擬後端回應。它要求明確區分通過實際 UI 的狀態截圖與行為斷言,以保留失敗和成功的嘗試記錄。支援的平台包括 AI 編碼代理,例如那些使用類似框架進行瀏覽器測試的 Claude Code 或 Cursor。此技能確保所有宣稱的結果都有可檢查的證據,任何涵蓋範圍的缺口都會被明確記錄。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/clawdbot/clawdbot/tree/main/.agents/skills/control-ui-e2e

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

控制介面端對端測試 是做什麼的?

工作流程

  1. 選擇證明。 使用現有的瀏覽器 E2E 通道進行路由、啟動、閘道器交握以及完整的使用者流程;對於獨立的渲染邏輯則使用瀏覽器/單元測試。閱讀下方每個與請求結果相符的分支說明。新增或變更的錯誤、空白與載入狀態遵循狀態截取閘道。為每個狀態命名(包含僅文字變更),並透過實際 UI 進行截取。頻道通知需要實際頻道分支,而非此 UI 測試固件。 完成: 每個已變更的行為都有一個命名情境與證明邊界。
  2. 準備測試夾具。 重複使用 ui/src/test-helpers/control-ui-e2e.ts 並搭配合成閘道資料。為缺少的回應擴充其型別化情境選項。使用現有的依賴安裝;保留其他任務所使用的安裝。實際的閘道器/提供者憑證需要明確的即時證明授權。遵循測試政策來決定執行位置。 完成: 目標流程會針對預期的原始碼或正式建置版本執行,且每個必要的夾具回應都已定義。
  3. 執行行為。 在導覽前安裝模擬。透過可見的控制項進行操作,並斷言渲染結果以及相關的閘道器請求。在重新執行前,先於產品或夾具擁有者處解決非預期行為。 完成: 每個情境都達到其斷言結果,或保留一個指出未滿足斷言的失敗記錄。
  4. 交付證據。 套用下方的產出物規則以及所選分支的檢查。分別報告已驗證的結果、失敗與未測試的狀態。 完成: 每個宣稱的結果都有可檢查的證據;剩餘的缺口已被命名。

UI 壓力測試

對於重大版面/元件變更或多狀態設計回饋,請在建立壓力測試圖庫前先閱讀視覺證明。小幅的文字/圖示變更可使用重點證明。

視覺證明預設

對於外觀變更、螢幕截圖、暫時狀態截取或影片,請閱讀視覺證明。外觀變更需要經過審查的前後對比證據;對於非視覺性的修正,僅靠行為斷言即可滿足要求。

互動效能稽核

對於 UI 緩慢、回應性稽核或自動 Chrome 追蹤收集,請在選擇建置版本、夾具與測量邊界前,先閱讀互動效能分析。

執行檢查器證據

對於執行/運作/決策證據,請在選擇收據前先閱讀執行檢查器截取。

產出物

  • 使用 createControlUiE2eArtifactDir(scope, parentDir?) 分配目錄,每個嘗試或獨立呼叫一次。將目錄傳遞給截取輔助函式;保持不同的階段檔名,並將報告、螢幕截圖、追蹤與影片放在一起。
  • 此輔助函式擁有父目錄選擇權。保留現有的輸出控制項、閘道、視埠與錄製選項;在最終報告中使用其回傳的路徑。
  • 保留失敗與成功的嘗試。審查後僅清除確切擁有的目錄;切勿清除共用的產出物父目錄或覆寫先前的證明。
  • 逾時診斷使用其現有診斷父目錄的新子目錄。Mantis 會保留每次嘗試。Real-Gateway、chat-outbox-* 與 chat-attachment-read-lifecycle 套件有各自的擁有者:在聲稱可安全重播截取之前,請先驗證其保留行為。

執行重點測試

使用 package.json 中的現有腳本與測試政策。對於工作樹的聚焦瀏覽器測試:

node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/chat-flow.messaging.e2e.test.ts

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

acp-router

Route plain-language requests for Claude Code, Cursor, Copilot, OpenClaw ACP, OpenCode, Gemini CLI, Grok Build, Qwen, Kiro, Kimi, iFlow, Factory Droid, Kilocode, or explicit ACP harness work into either OpenClaw ACP runtime sessions or direct acpx-driven sessions ("telephone game" flow). For coding-agent thread requests, read this skill first, then use only `sessions_spawn` for thread creation. Codex chat binding defaults to the native Codex app-server plugin unless ACP is explicit or background spawn needs ACP.

add-model-provider

Add and live-prove a model provider with non-interactive config one-liners, without exposing credentials.

agent-transcript

Requested GitHub PR/issue agent transcripts: redact, trim, preview, and insert safely.

apple-notes

Create, view, edit, delete, search, move, or export Apple Notes via the memo CLI on macOS.

apple-reminders

List, add, edit, complete, or delete Apple Reminders and reminder lists via remindctl.

auto-qa

Run OpenClaw-wide autonomous QA and live/stress campaigns across independent subsystem lanes, with verified fixes and a resumable evidence report.

autoreview

Structured code review through the shared OpenClaw agent-skills installation.

bear-notes

Create, search, and manage Bear notes via grizzly CLI.

blacksmith-testbox

Run Blacksmith Testbox for CI-parity checks, secrets, hosted services, migrations, or builds local cannot reproduce.

block-kit

Use proactively for structured or interactive Slack replies, and when asked to author or validate native Slack Block Kit JSON.

blogwatcher

Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.

blucli

BluOS CLI (blu) for discovery, playback, grouping, and volume.

bluebubbles

Send and manage iMessages via BlueBubbles, including attachments, tapbacks, edits, replies, and groups.

browser-automation

Use when controlling web pages with the OpenClaw browser tool, especially multi-step flows, login checks, tab management, or recovery from stale refs/timeouts.

camsnap

Capture frames or clips from RTSP/ONVIF cameras and local webcams, including USB pan/tilt/zoom control.

canvas

Present HTML on connected OpenClaw node canvases, navigate/eval/snapshot, and debug canvas host URLs.

channel-message-flows

Use when running QA Lab channel message flow evidence.

clawdtributor

Clawtributor PRs here, last week or another window: discover conversation refs, recheck GitHub, rank by impact.

clawhub

Search ClawHub for plugins by default, or skills and agent Templates when requested; add Templates; install, verify, update, uninstall, publish, or sync skills.

相關技能