qa/e2e-playwright
This skill equips you with Playwright, a powerful framework for automating browser-based testing across multiple platforms. Deploy comprehensive end-to-end test suites that validate your web application's functionality, user interactions, and cross-browser compatibility with minimal configuration overhead.
qa/e2e-playwright equips you with a complete setup workflow for Playwright, covering installation, configuration, and initial project scaffolding. The skill guides you through initializing Playwright in your web project, selecting target browsers (Chromium, Firefox, WebKit), and configuring test runners to establish a foundation for automated browser-based testing across multiple platforms with minimal configuration overhead.
AI-generated summary based on this skill's SKILL.md
Install
echoVic/boss-skill/e2e-playwright · repository language: TypeScript
git clone https://github.com/echoVic/boss-skill
cp -r boss-skill/skill/skills/qa/e2e-playwright ~/.claude/skills/e2e-playwrightFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
What is the playwright e2e testing setup process?
qa/e2e-playwright equips you with a complete setup workflow for Playwright, covering installation, configuration, and initial project scaffolding. The skill guides you through initializing Playwright in your web project, selecting target browsers (Chromium, Firefox, WebKit), and configuring test runners to establish a foundation for automated browser-based testing across multiple platforms with minimal configuration overhead.
How do you implement Page Object Model patterns in Playwright tests?
qa/e2e-playwright teaches best practices for maintainable E2E tests through the Page Object Model approach, which encapsulates page-specific selectors and interactions into reusable classes. This skill covers structuring your test suite to separate test logic from UI implementation details, making your tests more readable, maintainable, and resilient to UI changes while enabling efficient test reuse across multiple test scenarios.
How to write end-to-end tests with playwright for critical user workflows?
qa/e2e-playwright provides comprehensive guidance on covering critical user workflows including authentication, CRUD operations, and core business flows. The skill teaches you how to validate complete user journeys from login through data manipulation to confirmation, ensuring your test suite captures real-world application behavior and validates that essential business processes function correctly across your web application.
What techniques does qa/e2e-playwright offer for debugging and fixing flaky tests?
qa/e2e-playwright equips you with advanced troubleshooting techniques including trace viewer inspection, UI mode interactive debugging, and systematic flaky test fixes. The skill covers identifying root causes of test instability, using Playwright's built-in debugging tools to capture detailed execution traces, and implementing strategies to eliminate timing issues and environmental dependencies that cause unreliable test results.
How do you integrate Playwright E2E tests into CI/CD pipelines?
qa/e2e-playwright covers integrating E2E tests into CI/CD pipelines to meet gating requirements, with specific guidance on GitHub Actions and other automation platforms. The skill teaches you how to configure automated test execution in your deployment workflow, manage test artifacts, parallelize test runs for efficiency, and establish quality gates that prevent code deployment when critical tests fail.
Can qa/e2e-playwright help with API mocking and visual regression testing?
qa/e2e-playwright addresses both API mocking and visual regression testing as part of comprehensive E2E validation. The skill teaches you how to stub and mock API calls to isolate frontend testing from backend dependencies, and covers screenshot comparison techniques for detecting unintended visual changes. These capabilities enable you to test user interfaces reliably while controlling external dependencies and validating visual consistency across browser versions.
SKILL.md
rendered from the published skill — quoted content, verbatim
Playwright E2E 测试方法论
适用场景
- Web 项目需要编写端到端测试
- 门禁(Gate 1)要求 E2E 测试通过
- 需要覆盖关键用户流程的自动化验证
- 需要多浏览器/多视口兼容性验证
- 需要视觉回归测试
1. 项目初始化
1.1 安装
# 新项目初始化(推荐)
npm init playwright@latest
# 已有项目添加
npm install -D @playwright/test
npx playwright install
1.2 配置文件(playwright.config.ts)
```typescript import { defineConfig, devices } from '@playwright/test';
export default defineConfig({ testDir: './e2e', // 测试产物目录 outputDir: './e2e/test-results',
// 全局超时 timeout: 30_000, expect: { timeout: 5_000 },
// 并行执行 fullyParallel: true, workers: process.env.CI ? 1 : undefined,
// 失败重试(CI 中重试一次减少 flaky) retries: process.env.CI ? 1 : 0,
// 报告 reporter: [ ['html', { outputFolder: './e2e/playwright-report' }], ['json', { outputFile: './e2e/test-results/results.json' }], // CI 中额外输出到
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 1 file
skill/skills/qa/e2e-playwright/SKILL.md