e2e-testing
它能做什么
这项技能检查项目是否从头到尾测试了其主要的用户流程。适合希望在客户发现问题之前就将其捕捉到的开发者。
适用场景
- ✓当你的应用有注册、结账或其他关键流程却没有自动化测试时。
- ✓当测试已经存在,但没有在构建流程中运行时。
- ✓当你想在项目中添加 Playwright 或 Cypress 测试时。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/e2e-testing/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“你能为注册和结账流程添加端到端测试吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会查看你当前的测试和构建流程,使用 Playwright 或 Cypress 等工具为关键流程建议测试,并检查失败的测试是否会阻止发布。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Implement end-to-end testing
E2E tests catch integration issues that unit tests miss—verifying your application works correctly from the user's perspective across all components.
Quick Reference
- Test critical user journeys: authentication, checkout, core business flows
- Use data-testid attributes for stable, maintainable selectors
- Implement Page Object Model for reusable test components
- Run E2E tests in CI/CD with artifact uploads on failure
Check
Review this project for E2E test coverage of critical user journeys like authentication, checkout, and form submissions.
Fix
Add E2E tests for critical user journeys using Playwright or Cypress.
Explain
Explain E2E testing best practices including test organization, selectors, and CI/CD integration.
Code Review
Review tests, CI workflows, and enforcement points related to Implement end-to-end testing. Flag exact gaps where the rule is not automatically verified or where failures do not block regressions.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/testing/e2e-testing
常见问题
端到端是什么意思?
它指的是像用户一样测试整个应用,从第一个屏幕直到最终结果。
为什么要使用 data-testid 属性?
这项技能建议把它作为稳定的选择器,使样式变化时测试不会失效。
测试失败时应该怎样?
这项技能说明,失败应阻止回归问题的发布,并且在运行失败时应上传测试结果以供审查。
详情
作者的原始描述
Use when reviewing CI coverage, automated checks, or test strategy related to Implement end-to-end testing. Focus on whether the rule is continuously verified, not just documented.
热度
- GitHub 星标
- 75k
- 排名
- #2827
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。