Skip to content
Agentmart
Submit a tool

e2e-testing

端到端测试实战 —— 关键用户流程覆盖、测试数据管理、环境隔离与 Playwright/Cypress 最佳实践

Skill by Sweetteabittersugar

IndexedMIT★ 3
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/sweetteabittersugar-e2e-testing

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

端到端测试实战 —— 关键用户流程覆盖、测试数据管理、环境隔离与 Playwright/Cypress 最佳实践

Use cases: testing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/e2e-testing

What's inside

Skill name
e2e-testing
Description
端到端测试实战 —— 关键用户流程覆盖、测试数据管理、环境隔离与 Playwright/Cypress 最佳实践
License
MIT
Instructions
30 lines in SKILL.md · view on GitHub

Files (2)

  • SKILL.md
  • SKILL.md.disabled

SKILL.md (first lines)

# 端到端测试

## 概述
提供端到端(E2E)测试的策略设计和工具使用指南,确保关键用户流程在真实浏览器环境中正常工作。

## 使用场景
- 确定 E2E 测试范围和关键用户旅程
- 新项目搭建 E2E 测试框架
- E2E 测试不稳定(flaky)的排查和修复
- 测试数据管理和环境隔离方案设计

## 核心原则
1. **只覆盖关键路径**:E2E 测试慢且脆弱,不值得覆盖所有分支。聚焦核心用户旅程——注册、登录、下单、支付等。
2. **测试金字塔原则**:单元测试最多,集成测试适中,E2E 测试最少。不要用 E2E 替代单元测试。
3. **数据隔离**:每个测试用例使用独立的测试数据,测试后清理,不留副作用。
4. **稳定性是生命线**:Flaky 测试比没有测试更糟——它们消耗 CI 时间且降低团队对测试的信任。
5. **使用 data-testid 而非 CSS 选择器**:CSS 类名随样式变化频繁变动,`data-testid` 是稳定的元素定位方式。

## Playwright vs Cypress
- **Playwright**:多浏览器原生支持、网络拦截能力强、并行执行效率高。新项目首选。
- **Cypress**:实时重载体验好、调试友好、社区成熟。已有项目且无多浏览器需求时可继续使用。

## 检查清单
- [ ] 是否只覆盖了关键用户旅程(不超过 20 个场景)?
- [ ] 测试数据是否完全隔离且可重复执行?
- [ ] 是否使用 data-testid 而非 CSS 选择器定位元素?
- [ ] 是否有 flaky test 的标记和跟进机制?
- [ ] CI 中 E2E 是否有独立的执行环境和超时配置?

From Sweetteabittersugar/agency, MIT.

More from Sweetteabittersugar/agency

Signals

Stars
3
Forks
1
Open issues
0
Last commit (this folder)
Jun 10, 2026 (4 months ago)
Last release
Aug 24, 2026 (2 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from Sweetteabittersugar

Cite this page

e2e-testing skill. Agent Mart. https://agentmart.dev/skills/sweetteabittersugar-e2e-testing (last updated 2026-10-24)