Community程式設計與開發github.com

Discord 端到端測試

使用 Convex 租賃的 QA 機器人測試 Discord:無需 Gateway 即可檢查憑證、操作自有訊息,或驗證 OpenClaw 的回覆、檔案、討論串、反應、串流和打字行為。區分 API 和 Gateway 證據與手動使用者互動。

Discord 端到端測試 是什麼?

此技能支援開發者在 Discord 上對機器人行為進行端到端測試,特別適用於 Convex 平台上的 QA 機器人租賃系統。它允許透過 API 探測(無需 Gateway)快速驗證共享機器人對、頻道和歷史記錄的存取權限,並透過現有的 `channelE2e` 生命週期測試自有訊息的變更(如反應、檔案、討論串)。對於更複雜的 OpenClaw 行為,它依賴 QA Lab 流程,該流程使用臨時 Gateway 和模型提供者進行隔離測試,涵蓋真實 Discord 事件的接收和儲存。此外,該技能明確區分了可透過 API 或 Gateway 日誌證明的自動化行為與需要經授權手動 Discord 用戶端驗證的視覺或互動行為,確保測試策略的完整性。

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

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

在你喜歡的 AI 中提問

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

說明文件

Discord 端到端測試 是做什麼的?

選擇能證明所需行為的最小測試範圍:

目標進入點證明內容
檢查共享機器人對與頻道下方唯讀命令機器人身份、固定的受測系統(SUT)、公會文字頻道及歷史存取權限
測試機器人發起的變更現有 channelE2e 生命週期自有訊息、反應、檔案、討論串及清理
驗證 OpenClaw 行為現有 QA Lab 流程真實 Discord 事件、隔離的 SUT Gateway 及選定的模型通道
驗證人類互動或渲染經授權的手動 Discord 用戶端實際使用者操作或擷取的用戶端畫面

API 探測不啟動 Gateway、事件記錄器或模型。QA Lab 仍然是產品端到端測試的擁有者:它控制租賃、臨時 Gateway、提供者、取消和清理。這兩種途徑都不會改變應用程式權限或佈建憑證。

1. 選擇證據

閱讀受變更行為的功能配方。原生 Fixture 呼叫證明 Discord API 操作,而非模型呼叫工具。SUT 的往返測試則進一步證明 Gateway 的入口和儲存過的公開回覆。模型-工具的聲明還需要工具追蹤和提供者請求的證據。

人類的斜線命令、元件點擊、模態框、短暫互動以及人對機器人的私訊需要經授權的手動用戶端。機器人發布 /status 發送的是文字,而非斜線互動。僅使用租賃中的官方機器人令牌。Discord 禁止使用者令牌/自機器人自動化;Slack 的使用者 OAuth 路由在此沒有對應方案。

2. 準備並檢查目前租賃

使用測試中的依賴就緒 OpenClaw 簽出。設定先決條件是已通過驗證的 Convex CLI,並能存取已發布的 QA Broker。現有的共享租賃輔助程式會發現儲存庫的 Broker 綁定和記憶體中的 CI 憑證;您無需複製機器人令牌、公會 ID 或 Broker 密鑰。如果缺少驗證,請操作員執行 convex login(或已快取的 bunx --no-install convex login)一次。請勿代操作員安裝 CLI 或登入。網路/權限錯誤並非需要重新登入的證據。

如需快速檢查而不啟動 QA Lab:

node .agents/skills/discord-e2e/scripts/bot-readiness.mjs

此檢查在 Discord 中是唯讀的,但它會取得、續約並釋放 Convex 租賃。它不會建立任何 Discord 物件且沒有變更模式。請參閱機器人 API 就緒狀態以了解負載、權限限制、私人結果和失敗處理。

此探測不驗證 Gateway Intents、事件傳遞、模型行為或所有原生 Fixture 權限。對於 OpenClaw 聲明,請繼續使用 QA Lab:

pnpm openclaw qa discord --list-scenarios
pnpm openclaw qa discord --doctor \
  --output-dir .artifacts/qa-e2e/discord-doctor

要求此通道的 QA Lab Doctor 檢查通過。它不會發送任何 Fixture 訊息;它檢查租賃的身份、公會文字頻道、有效權限、驅動程式 Gateway Intents 以及已連接的 SUT Gateway。每個場景都會在自己的租賃上重複就緒檢查;已釋放的 Doctor 結果絕不能證明後續執行的有效性。

--doctor 和 --scenario-file 預設為 Convex、CI 角色和 mock-openai。現有的明確憑證/提供者標誌仍然有效;一般的策展 qa discord 預設值保持不變。預先佈建的私人 Broker 環境變數是發現的替代方案,而非先決條件。

3. 執行一個範圍內的證明

對於原生生命週期加上真實 Gateway 回覆:

pnpm openclaw qa discord \
  --scenario-file qa/scenarios/channels/discord-e2e-lifecycle.yaml \
  --output-dir .artifacts/qa-e2e/discord-lifecycle

對於變更的功能,使用功能配方調整該 YAML。--scenario-file 可重複使用,並遵循現有的 QA 流程架構。為原生寫入場景設定 retryCount: 0。為每個證明使用新的輸出目錄。這些範例是選擇性加入,而非新增至策展的預設套件中。

在變更設定、重新啟動 SUT、選擇真實提供者、診斷取消或協調失敗的清理時,請參閱執行時間與復原。

4. 判斷與報告

對於 API 探測,要求 status: ready 和 leaseReleased: true。空的歷史記錄列表為 inconclusive(退出碼 2):這可能表示頻道為空或缺少「讀取訊息歷史」權限。使用 QA Lab Doctor 來區分這些情況;不要將任何一種情況稱為已證實的權限失敗。將就緒結果報告為機器人身份和觀察到的唯讀存取證明,而非變更或 Gateway 端到端測試。私密的 result.json 包含租賃的身份和檢查狀態,而非令牌或歷史記錄。

對於 QA Lab,檢查輸出目錄下的 qa-suite-summary.json、qa-suite-report.md、Gateway/提供者工件以及每個私密的 discord-e2e-*/events.ndjson。透過訊息 ID 將原生收據與記錄器行關聯;使用 actor: sut、頻道、序號和觸發關聯進行 SUT 聲明。單獨的標記並不能證明編輯、反應、打字、刪除、格式或模型工具呼叫。事件日誌不是視覺證據;視覺聲明需要實際的 Discord 用戶端螢幕截圖。

完成需要請求的證據以及在 Gateway 停止後、租賃釋放前的成功自有清理。現有權限決定自有討論串是被刪除還是被封存;報告記錄的處置方式,絕不要將封存稱為刪除。失敗時保留私密證據。報告清理後的命令、確切修訂版本、聲明、相關證據、僅限手動的缺口以及清理結果。在分享工件前,請編輯身份、不相關內容、私密路徑和憑證。

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.

相關技能