← Browse

@asiaostrich/e2e-assistant

B

[UDS] 從 BDD 場景生成 E2E 測試骨架,支援框架偵測與覆蓋差距分析

skillclaude

Install

agr install @asiaostrich/e2e-assistant --target claude

Writes 1 file into .claude/skills/, pinned to git-31061711.

  • .claude/skills/e2e-assistant/SKILL.md

Document


name: e2e-assistant source: ../../../../skills/e2e-assistant/SKILL.md source_version: 1.0.0 translation_version: 1.0.0 last_synced: 2026-04-10 status: current description: "[UDS] 從 BDD 場景生成 E2E 測試骨架,支援框架偵測與覆蓋差距分析"

E2E 助手

語言: English | 繁體中文

[!WARNING] 實驗性功能 / Experimental Feature

此功能正在積極開發中,可能在 v4.0 中有重大變更。 This feature is under active development and may change significantly in v4.0.

從 BDD .feature 場景生成 E2E 測試骨架,支援框架偵測與覆蓋差距分析。

工作流程

/derive bdd → .feature 場景
    ↓
/e2e → 分析 AC 適用性 → 偵測框架 → 參考既有模式 → 生成骨架
    ↓
手動執行驗證

模式

1. 生成模式(預設)

分析 BDD 場景、分類 AC 適用性、偵測框架、生成 E2E 測試骨架。

2. 分析模式(--analyze)

掃描 BDD feature 與既有 E2E 測試之間的覆蓋差距。

AC 分類

類別條件範例
e2e-suitable多步驟使用者流程或 UI 互動登入 → 操作 → 驗證
integration-suitable跨元件但無 UIAPI 呼叫 → DB 寫入
unit-suitable純邏輯或計算排序、驗證、格式化

支援框架

框架自動偵測範本
Playwright@playwright/test
Cypresscy.* 指令
Vitestdescribe/it + async

使用方式

/e2e <feature-file>            - 從 BDD 場景生成 E2E 骨架
/e2e <spec-file>               - 委派 /derive e2e 處理 SDD 規格
/e2e --analyze                 - 掃描所有 feature 的 E2E 覆蓋差距
/e2e --analyze <feature-file>  - 分析特定 feature 的 AC 適用性

下一步引導

/e2e 完成後,AI 助手應建議:

E2E 骨架已生成。建議下一步:

  • 執行 /tdd 填入 [TODO] 標記的測試實作 ⭐ 推薦 — 實作測試邏輯
  • 執行 /checkin 品質關卡(若功能完成)
  • 執行 /e2e --analyze 檢查整體 E2E 覆蓋狀況

參考

AI 代理行為

完整的 AI 行為定義請參閱對應的命令文件:/e2e

Trustgrade B

  • passBody integrity

    Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.

  • passType matchnot applicable to this artifact type

    Whether the artifact is really the kind of thing its metadata claims it is.

  • passFreshness

    How long since the source repository was last pushed to.

  • passPrompt injection

    Scans the artifact's own text for instructions aimed at your agent rather than at you.

  • warnLicenseno SPDX license detected

    Whether the source repository declares an SPDX license permissive enough to redistribute.

How the grade is calculated

Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:

  • Aevery check passed
  • Bone warning
  • Ctwo warnings
  • Dprompt injection or body integrity failed, or three warnings
  • Fone of those failed, and something else is wrong

These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.

Versions

  • git-31061711feb82026-07-31