Token导航 LogoToken导航

Agent Skill · 待分类

playwright-e2e-tester(Playwright E2E tester 测试)

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

playwright-e2e-tester 是待分类类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描已通过,按安装量在待分类类的 11,209 个 Skill 里排第 2,017。

总安装 1,972周安装 83GitHub Stars 98下载 691核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/erichowens/some_claude_skills --skill playwright-e2e-tester

这个 Skill 是做什么的

这个 Skill 的分类还没最终确定,用法以来源仓库的说明为准。

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

playwright-e2e-tester 属于待分类类 Skill,可作为该场景下的辅助能力补充。

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

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

playwright-e2e-tester 怎么安装?

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

playwright-e2e-tester 支持哪些 AI 工具?

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

playwright-e2e-tester 需要什么权限?

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

playwright-e2e-tester 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

playwright-e2e-tester 用的人多吗?

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

playwright-e2e-tester 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

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

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

待分类类 Skill 对比

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

infsh CLI · Codex、Claude

4,374,576382权限未标注未明确未收录
ai-video-generation

AI 视频生成 · Codex、Claude

4,313,376382调用外部服务未明确有提醒
lark-openapi-explorer

云雀 OpenAPI 浏览器 · Codex、Claude

2,064,1209,011需要联网未明确有提醒
lark-workflow-standup-report

Lark 工作流程站立报告 · Codex、Claude

2,041,6328,978需要联网未明确通过
use-my-browser

使用我的浏览器 · Codex、Claude

1,848,49140操作浏览器未明确未通过
playwright-e2e-tester

Playwright E2E tester 测试 · 本页

1,97298操作浏览器未明确通过

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

SKILL.md 原文

Playwright E2E Tester

Overview

Expert in end-to-end testing with Playwright, the modern cross-browser testing framework. Specializes in test generation, page object patterns, visual regression testing, and CI/CD integration. Handles complex testing scenarios including authentication flows, API mocking, and mobile emulation.

When to Use

  • Setting up Playwright in a new or existing project
  • Writing E2E tests for critical user flows
  • Debugging flaky tests or test failures
  • Implementing visual regression testing
  • Configuring Playwright for CI/CD pipelines
  • Migrating from Cypress, Selenium, or Puppeteer
  • Testing authenticated flows with session management
  • Cross-browser testing (Chromium, Firefox, WebKit)

Capabilities

Test Generation & Writing

  • Generate Playwright tests from user stories or acceptance criteria
  • Write tests using best practices (locators, assertions, waits)
  • Implement Page Object Model (POM) patterns
  • Create reusable test fixtures and utilities
  • Handle dynamic content and race conditions

Configuration & Setup

  • Configure playwright.config.ts for different environments
  • Set up projects for multiple browsers and viewports
  • Configure base URL, timeouts, and retries
  • Implement global setup/teardown for auth
  • Set up test reporters (HTML, JSON, JUnit)

Advanced Patterns

  • API mocking with route() and fulfill()
  • Network interception and request validation
  • Visual regression with toHaveScreenshot()
  • Accessibility testing with @axe-core/playwright
  • Mobile emulation and device testing
  • Geolocation and permissions mocking

CI/CD Integration

  • GitHub Actions workflow configuration
  • Parallel test execution with sharding
  • Artifact collection (traces, screenshots, videos)
  • Flaky test detection and retry strategies
  • Test result reporting and notifications

Debugging & Maintenance

  • Use Playwright Inspector and Trace Viewer
  • Debug with page.pause() and headed mode
  • Analyze test traces for failures
  • Reduce test flakiness with proper waits
  • Maintain test stability over time

Dependencies

Works well with:

  • vitest-testing-patterns - Unit test patterns that complement E2E
  • github-actions-pipeline-builder - CI/CD pipeline setup
  • accessibility-auditor - Extended accessibility testing
  • api-architect - API contract testing alongside E2E

Examples

Basic Test Structure

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

test.describe('User Authentication', () => {
  test('should allow user to sign in', async ({ page }) => {
    await page.goto('/login');

    await page.getByLabel('Email').fill('user@example.com');
    await page.getByLabel('Password').fill('securepassword');
    await page.getByRole('button', { name: 'Sign In' }).click();

    await expect(page.getByRole('heading', { name: 'Dashboard' })).toBeVisible();
    await expect(page).toHaveURL('/dashboard');
  });
});

Page Object Pattern

// pages/LoginPage.ts
import { Page, Locator } from '@playwright/test';

export class LoginPage {
  readonly page: Page;
  readonly emailInput: Locator;
  readonly passwordInput: Locator;
  readonly signInButton: Locator;

  constructor(page: Page) {
    this.page = page;
    this.emailInput = page.getByLabel('Email');
    this.passwordInput = page.getByLabel('Password');
    this.signInButton = page.getByRole('button', { name: 'Sign In' });
  }

  async goto() {
    await this.page.goto('/login');
  }

  async signIn(email: string, password: string) {
    await this.emailInput.fill(email);
    await this.passwordInput.fill(password);
    await this.signInButton.click();
  }
}

Auth Setup Fixture

// fixtures/auth.ts
import { test as base } from '@playwright/test';

export const test = base.extend({
  authenticatedPage: async ({ page }, use) => {
    // Perform authentication
    await page.goto('/login');
    await page.getByLabel('Email').fill(process.env.TEST_USER!);
    await page.getByLabel('Password').fill(process.env.TEST_PASS!);
    await page.getByRole('button', { name: 'Sign In' }).click();

    // Wait for auth to complete
    await page.waitForURL('/dashboard');

    // Use the authenticated page in tests
    await use(page);
  },
});

GitHub Actions CI

name: E2E Tests

on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20

      - name: Install dependencies
        run: npm ci

      - name: Install Playwright browsers
        run: npx playwright install --with-deps

      - name: Run E2E tests
        run: npx playwright test

      - name: Upload test results
        if: always()
        uses: actions/upload-artifact@v4
        with:
          name: playwright-report
          path: playwright-report/

Visual Regression Test

test('homepage matches snapshot', async ({ page }) => {
  await page.goto('/');

  // Full page screenshot comparison
  await expect(page).toHaveScreenshot('homepage.png', {
    fullPage: true,
    maxDiffPixelRatio: 0.01,
  });

  // Component-level screenshot
  const hero = page.getByTestId('hero-section');
  await expect(hero).toHaveScreenshot('hero-section.png');
});

API Mocking

test('displays products from API', async ({ page }) => {
  // Mock the API response
  await page.route('**/api/products', async (route) => {
    await route.fulfill({
      status: 200,
      contentType: 'application/json',
      body: JSON.stringify([
        { id: 1, name: 'Product A', price: 29.99 },
        { id: 2, name: 'Product B', price: 49.99 },
      ]),
    });
  });

  await page.goto('/products');

  await expect(page.getByText('Product A')).toBeVisible();
  await expect(page.getByText('$29.99')).toBeVisible();
});

Best Practices

  1. Use role-based locators - Prefer getByRole(), getByLabel(), getByText() over CSS selectors
  2. Avoid hard waits - Use waitForSelector(), waitForURL(), or assertions instead of waitForTimeout()
  3. Isolate tests - Each test should be independent and not rely on state from other tests
  4. Use fixtures - Share setup logic through fixtures rather than beforeEach hooks
  5. Keep tests focused - Test one user flow per test, avoid testing multiple unrelated things
  6. Handle flakiness proactively - Use proper waits, retries, and stable locators
  7. Organize with Page Objects - Encapsulate page interactions for maintainability
  8. Run in CI - Always run E2E tests in CI before merging

Common Pitfalls

  • Flaky locators: Avoid fragile selectors like nth-child(3) or auto-generated class names
  • Race conditions: Always wait for elements/navigation before interacting
  • Shared state: Tests should not depend on execution order
  • Slow tests: Use API calls to set up state instead of UI interactions when possible
  • Missing cleanup: Clean up test data to avoid pollution between runs

平台分布

Codex

32.65%
按下载量换算226

Claude

29.17%
按下载量换算202

Cursor

19.49%
按下载量换算135

Gemini CLI

8.77%
按下载量换算61

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

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

安装前确认

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

继续浏览同类 Skills