跳到正文
Skillpedia
测试75k · #2827

e2e-testing

它能做什么

这项技能检查项目是否从头到尾测试了其主要的用户流程。适合希望在客户发现问题之前就将其捕捉到的开发者。

适用场景

  • ✓当你的应用有注册、结账或其他关键流程却没有自动化测试时。
  • ✓当测试已经存在,但没有在构建流程中运行时。
  • ✓当你想在项目中添加 Playwright 或 Cypress 测试时。

技能链接

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/e2e-testing/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/e2e-testing/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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.

repo: thedaviddias/Front-End-Checklist

热度

GitHub 星标
75k
排名
#2827
许可证
MIT
更新时间
2026/10/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能