pdlc-e2e

Solid

端到端测试(生成或执行 E2E 用例)

AI & Automation 16 stars 2 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 85/100

Stars 20%
41
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# 端到端测试 <!-- @include templates/prompts/iron-law.md(已内联于下方,无需另读) --> ⛔ **IRON LAW · 不可违反的硬门禁** 以下规则为**不可协商**的执行约束: 1. **文件必须落盘**:所有带编号(功能ID / 缺陷ID)的文档,必须作为实际文件写入磁盘,不可仅在对话中输出。 2. **阶段必须落章**:每个阶段完成后必须在状态机 `docs/.pdlc-state/<feature-id>.json` 追加 history,不可跳过。 3. **测试必须存在**:进入 `/pdlc-implement` 前,对应测试必须存在且处于红灯状态。违反则中止。 4. **自检必须执行**:段二自检为强制步骤,不得以"已经很好了"为由跳过。 5. **防循环**:段三修复为单次,不递归。无法自动修复的问题记录到报告,继续往下走。 6. **状态必推进**:成功执行某 phase 后 `current_stage` 必须变更。收尾时若发现 `current_stage` 未推进,视为失败并报错,**不得静默返回**(防止外层循环拿滞后的状态空转烧额度)。唯一例外:命中人工点主动 block 时,`current_stage` 保持不变但必须写 `last_phase_result.ok=false` + `blocked_reason`。 **违反任一条 = 立即中止当前命令,输出违规详情,等待人工介入。** <!-- @include-end templates/prompts/iron-law.md --> 编写端到端(E2E)测试用例,验证完整的用户操作流程。 ## 工作流程 1. **阅读需求文档**: 阅读 `docs/01_requirements/user-stories/` 下的用户故事和验收标准 2. **阅读 UI 设计**: 阅读 `docs/02_design/ui-ux/` 下的 UI 设计文档 3. **梳理测试场景**: 按用户旅程梳理核心操作路径 4. **编写测试计划**: 在 `docs/04_testing/e2e-tests/` 下补充 E2E 测试用例 5. **编写测试代码**: 使用项目对应的 E2E 框架编写自动化测试 6. **运行验证**: 确保测试可通过 ## 测试场景设计 - **核心路径(P0)**: 必须通过,如登录→主流程→结果验证 - **分支路径(P1)**: 常见的备选操作路径 - **异常路径(P2)**: 网络错误、超时、权限不足等异常场景 - **边界场景(P3)**: 空数据、超长输入、并发操作 ## 测试框架(根据前端技术栈) - React/Vue/Next.js: Playwright 或 Cypress - 微信小程序: miniprogram-automator - API 层: 直接用 HTTP 请求库 ## 要求 <!-- @include templates/prompts/output-language.md(已内联于下方,无需另读) --> 🌐 **Output language for generated artifacts** All generated artifacts (PRDs, design docs, code comments, review reports, test plans, deployment manuals, changelog entr...

Details

Author
kanfu-panda
Repository
kanfu-panda/pdlc-skills
Created
4 months ago
Last Updated
yesterday
Language
Shell
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category