Token导航 LogoToken导航

Agent Skill · 开发

e2e-testing(端到端测试)

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

e2e-testing 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证为 MIT,第三方扫描有未通过项,按安装量在开发类的 21,746 个 Skill 里排第 18,087。

总安装 360周安装 15GitHub Stars 160下载 120核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:e2e-testing(端到端测试)
来源仓库:https://github.com/yonatangross/orchestkit
仓库路径:skills/e2e-testing
安装命令:
npx skills add https://github.com/yonatangross/orchestkit --skill e2e-testing
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/yonatangross/orchestkit --skill e2e-testing

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

基于 Playwright 1.58+ 实现 AI 辅助的关键用户旅程端到端验证。推荐使用语义化定位器(如 getByRole、getByLabel),避免脆弱的选择器。支持网络拦截、文件上传与认证状态管理等高级场景。测试应聚焦产品行为而非 UI 状态,确保功能正确性优先于视觉呈现。

e2e-testing 属于开发类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/e2e-testing

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/yonatangross/orchestkit --skill e2e-testing;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

e2e-testing 怎么安装?

在终端执行 npx skills add https://github.com/yonatangross/orchestkit --skill e2e-testing。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

e2e-testing 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

e2e-testing 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

e2e-testing 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

e2e-testing 用的人多吗?

公开数据是累计安装 360 次,近一周安装 15 次,下载 120 次,GitHub 160 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

e2e-testing 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
e2e-testing

端到端测试 · 本页

360160操作浏览器MIT未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

E2E Testing with Playwright 1.58+

Validate critical user journeys end-to-end with AI-assisted test generation.

Quick Reference - Semantic Locators

// PREFERRED: Role-based locators (most resilient)
await page.getByRole('button', { name: 'Add to cart' }).click();
await page.getByRole('link', { name: 'Checkout' }).click();

// GOOD: Label-based for form controls
await page.getByLabel('Email').fill('test@example.com');

// ACCEPTABLE: Test IDs for stable anchors
await page.getByTestId('checkout-button').click();

// AVOID: CSS selectors and XPath (fragile)
// await page.click('[data-testid="add-to-cart"]');

Locator Priority: getByRole() > getByLabel() > getByPlaceholder() > getByTestId()

Basic Test

import { test, expect } from '@playwright/test';

test('user can complete checkout', async ({ page }) => {
  await page.goto('/products');
  await page.getByRole('button', { name: 'Add to cart' }).click();
  await page.getByRole('link', { name: 'Checkout' }).click();
  await page.getByLabel('Email').fill('test@example.com');
  await page.getByRole('button', { name: 'Submit' }).click();
  await expect(page.getByRole('heading', { name: 'Order confirmed' })).toBeVisible();
});

AI Agents (1.58+)

Initialize AI Agents

# Initialize agents for your preferred AI tool
npx playwright init-agents --loop=claude    # For Claude Code
npx playwright init-agents --loop=vscode    # For VS Code (requires v1.105+)
npx playwright init-agents --loop=opencode  # For OpenCode

Generated Structure

Running init-agents creates the following:

Directory/FilePurpose
.github/Agent definitions and configuration
specs/Test plans in Markdown format
tests/seed.spec.tsSeed file for AI agents to reference

Working with AI Agents

After initialization, agents can:

  • Read test plans from specs/ and generate tests
  • Use seed.spec.ts as a template for consistent patterns
  • Auto-repair failing tests by analyzing failures

Breaking Changes (1.58)

The following features have been removed in Playwright 1.58:

RemovedMigration
_react selectorUse getByRole() or getByTestId()
_vue selectorUse getByRole() or getByTestId()
:light selector suffixUse standard CSS selectors without :light
devtools launch optionUse args: ['--auto-open-devtools-for-tabs'] instead
macOS 13 WebKit supportUpgrade to macOS 14+ for WebKit testing

Migration Examples

// Before (1.57 and earlier)
await page.locator('_react=MyComponent').click();
await page.locator('.card:light').click();

// After (1.58+)
await page.getByTestId('my-component').click();
await page.locator('.card').click();

// DevTools launch option
// Before
const browser = await chromium.launch({ devtools: true });

// After
const browser = await chromium.launch({
  args: ['--auto-open-devtools-for-tabs']
});

New Features (1.58+)

// Connect over CDP with local flag
const browser = await chromium.connectOverCDP({
  endpointURL: 'http://localhost:9222',
  isLocal: true  // NEW: Optimizes for local connections
});

// Assert individual class names
await expect(page.locator('.card')).toContainClass('highlighted');

// Flaky test detection
export default defineConfig({
  failOnFlakyTests: true,
});

// IndexedDB storage state
await page.context().storageState({
  path: 'auth.json',
  indexedDB: true  // Include IndexedDB in storage state
});

Timeline in Speedboard HTML Reports

HTML reports now include a timeline visualization showing:

  • Test execution sequence
  • Parallel test distribution
  • Time spent in each test phase
  • Performance bottlenecks
// Enable HTML reporter with timeline
export default defineConfig({
  reporter: [['html', { open: 'never' }]],
});

Anti-Patterns (FORBIDDEN)

// NEVER use CSS selectors for user interactions
await page.click('.submit-btn');

// NEVER use hardcoded waits
await page.waitForTimeout(2000);

// NEVER test implementation details
await page.click('[data-testid="btn-123"]');

// ALWAYS use semantic locators
await page.getByRole('button', { name: 'Submit' }).click();

// ALWAYS use Playwright's auto-wait
await expect(page.getByRole('alert')).toBeVisible();

Key Decisions

DecisionRecommendation
LocatorsgetByRole > getByLabel > getByTestId
BrowserChromium (Chrome for Testing in 1.58+)
Execution5-30s per test
Retries2-3 in CI, 0 locally
ScreenshotsOn failure only

Critical User Journeys to Test

  1. Authentication: Signup, login, password reset
  2. Core Transaction: Purchase, booking, submission
  3. Data Operations: Create, update, delete
  4. User Settings: Profile update, preferences

Detailed Documentation

ResourceDescription
references/playwright-1.57-api.mdComplete Playwright API reference
examples/test-patterns.mdUser flows, page objects, visual tests
checklists/e2e-checklist.mdTest selection and review checklists
scripts/page-object-template.tsPage object model template

Related Skills

  • integration-testing - API-level testing
  • webapp-testing - Autonomous test agents
  • performance-testing - Load testing
  • llm-testing - Testing AI/LLM components

Capability Details

semantic-locators

Keywords: getByRole, getByLabel, getByText, semantic, locator Solves:

  • Use accessibility-based locators
  • Avoid brittle CSS/XPath selectors
  • Write resilient element queries

visual-regression

Keywords: visual regression, screenshot, snapshot, visual diff Solves:

  • Capture and compare visual snapshots
  • Detect unintended UI changes
  • Configure threshold tolerances

cross-browser-testing

Keywords: cross browser, chromium, firefox, webkit, browser matrix Solves:

  • Run tests across multiple browsers
  • Configure browser-specific settings
  • Handle browser differences

ai-test-generation

Keywords: AI test, generate test, autonomous, test agent, planner, init-agents Solves:

  • Generate tests from user journeys
  • Use AI agents for test planning
  • Create comprehensive test coverage

ai-test-healing

Keywords: test healing, self-heal, auto-fix, resilient test Solves:

  • Automatically fix broken selectors
  • Adapt tests to UI changes
  • Reduce test maintenance

authentication-state

Keywords: auth state, storage state, login once, reuse session, indexedDB Solves:

  • Persist authentication across tests
  • Avoid repeated login flows
  • Share auth state between tests

平台分布

Claude Code

29.77%
按下载量换算36

windsurf

21.17%
按下载量换算25

Gemini CLI

15.88%
按下载量换算19

Antigravity

11.86%
按下载量换算14

OpenCode

7.64%
按下载量换算9

trae

3.13%
按下载量换算4

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills