Skip to content
cccskills
FreePublished on GitHub

fec-e2e-testing

用于创建、维护、调试或审查真实浏览器端到端测试,包括 Playwright/Cypress、Page Object、CI 产物、trace、不稳定用例、跨页面视觉回归以及登录、支付、权限或 CRUD 等关键用户旅程。

若是测试层规划或靠近 UI 组件的测试,先选择对应测试工作流;中文触发词包括 E2E、端到端测试、Playwright、Cypress。

The English summary is being prepared. Showing the original description.

Works withPlaywright
See how to install

Files included (5)

  • SKILL.md2.8 KB
  • references/e2e-ci-reporting.md1.4 KB
  • references/e2e-special-scenarios.md1.7 KB
  • references/e2e-visual-regression.md1.9 KB
  • references/playwright-patterns.md2.2 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

E2E 测试规范

用途

用真实浏览器验证关键用户旅程,发现单元测试无法覆盖的集成风险。

流程

  1. 明确关键旅程:登录、购买、创建、搜索、权限、支付等跨页面流程优先;若只是选择测试层级,先做测试分层规划。
  2. 新项目优先 Playwright;已有 Cypress 项目沿用 Cypress,不为迁移而迁移。
  3. 用 Page Object 或 fixtures 封装登录、页面定位器和共享数据,spec 中避免裸选择器。
  4. 断言用户可见结果,依赖 Locator 自动等待、网络响应或可见状态,不使用固定 sleep。
  5. CI 必须上传 HTML report、截图、trace 或视频;flaky 用例要隔离、复现、标注来源并关联 issue。
  6. 调试失败时先读 trace、console、network 和截图,再改测试;不要把真实产品缺陷误判成 flaky。
  7. 对关键浏览器能力、支付、权限、上传和实时通信流程,记录测试环境、种子数据和清理策略。
  8. 测试数据必须可重复:优先使用 API seed、数据库 fixture、测试账号或 mock 服务;随机数据需带唯一前缀并在 teardown 清理。

详细参考

约束

  • 禁止依赖 sleep / 固定 setTimeout 作为主要同步手段。
  • 不在生产环境跑真实 E2E。
  • 避免在 E2E 中断言组件内部像素级样式;跨页面截图/视觉回归仅覆盖用户旅程中的关键页面状态。
  • 失败必须能靠截图、trace 或视频定位。
  • 组件内部契约测试分流到组件测试 workflow。
  • 不把不稳定等待、随机数据或依赖测试顺序带入 CI。
  • 不把重试次数当作 flaky 治理;重试只能保留证据,根因仍需定位。

预期输出

关键用户旅程有稳定 E2E 覆盖,失败产物可定位问题,CI 中报告和 trace 可下载;flaky 用例有复现命令、隔离策略和后续 issue。

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Use when reviewing or improving frontend accessibility, semantic structure, keyboard support, focus management, ARIA labels, screen reader behavior, WCAG 2.2 issues, touch accessibility, or assistive-technology regressions; Chinese triggers include accessibility, accessibility, a11y, WCAG, screen reader.

The English summary is being prepared. Showing the original description.

bovinphang/frontend-craft22Updated Sep 26, 2026

用于审查或改进前端无障碍、语义结构、键盘支持、焦点管理、ARIA 标签、屏幕阅读器行为、WCAG 2.2 问题、触控无障碍或辅助技术回归;中文触发词包括 无障碍、accessibility、a11y、WCAG、屏幕阅读器。

The English summary is being prepared. Showing the original description.

bovinphang/frontend-craft22Updated Sep 26, 2026

Use when absorbing ideas, capabilities, workflows, architecture, quality systems, ecosystem extensions, or engineering practices from any reference system into the current project through original, project-native redesign rather than copying.

The English summary is being prepared. Showing the original description.

bovinphang/frontend-craft22Updated Sep 26, 2026

用于从参考系统中吸收想法、能力、工作流、架构、质量体系、生态扩展或工程实践,并通过原创的项目内重设计转化为当前项目能力,而不是复制原实现。

The English summary is being prepared. Showing the original description.

bovinphang/frontend-craft22Updated Sep 26, 2026

Use when designing, implementing, or reviewing frontend-to-backend API integration, typed API clients, REST/tRPC/OpenAPI client choices, auth refresh, API error mapping, upload flows, SSE/WebSocket/polling choices, CORS-facing frontend behavior, or cross-boundary loading/error states. Do not use for backend-only service architecture or TanStack Query cache policy alone; Chinese triggers include API integration, front-end and back-end joint debugging, typed API client, Interface error handling, SSE, WebSocket.

The English summary is being prepared. Showing the original description.

bovinphang/frontend-craft22Updated Sep 26, 2026

用于设计、实现或审查前后端 API 集成、类型化 API client、REST/tRPC/OpenAPI 客户端选型、认证刷新、API 错误映射、上传流程、SSE/WebSocket/轮询选择、CORS 相关前端行为或跨边界 loading/error 状态。不要用于纯后端服务架构或仅 TanStack Query 缓存策略;中文触发词包括 API 集成、前后端联调、typed API client、接口错误处理、SSE、WebSocket。

The English summary is being prepared. Showing the original description.

bovinphang/frontend-craft22Updated Sep 26, 2026

See all skills by bovinphang

Report a problem with this skill