Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问clear审计未展示

e2e-testing端到端测试

Agent Skill

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

总安装

441

周安装

18

GitHub Stars

公开资料未说明

下载量

143
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

AgentSkills.tonpx skills
npx skills add yonatangross/skillforge-claude-plugin --skill "e2e-testing"

简介

e2e-testing 用于辅助测试设计、自动化测试、用例整理和回归验证,适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。

  • 适用于测试设计、自动化测试、用例整理和回归验证等场景。
  • 通过 npx skills add yonatangross/skillforge-claude-plugin --skill "e2e-testing" 安装。
  • 使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

E2E Testing with Playwright 1.57+

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.57+ - NEW)

# Generate test plan
npx playwright agents planner --url http://localhost:3000/checkout

# Generate tests from plan
npx playwright agents generator --plan checkout-test-plan.md

# Auto-repair failing tests
npx playwright agents healer --test checkout.spec.ts

New Features (1.57+)

// 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  // NEW
});

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.57+)
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 1.57+ 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 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 Solves:

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

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

32.41%
按下载量换算46

OpenCode

21.48%
按下载量换算31

Antigravity

18.65%
按下载量换算27

Gemini CLI

14.16%
按下载量换算20

windsurf

8.74%
按下载量换算12

trae

3.4%
按下载量换算5

安全审计

暂无安全审计结果可展示。

权限和风险

操作浏览器

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills