Token导航 LogoToken导航

Agent Skill · 研究检索

playwright-e2e-testing(Playwright E2E 测试)

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

playwright-e2e-testing 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 71,596。

总安装 194周安装 8GitHub Stars 1下载 63核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/dawiddutoit/custom-claude --skill playwright-e2e-testing

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

playwright-e2e-testing 支持端到端测试设计与自动化验证执行。包含初始状态快照、表单交互、控制台监控与网络请求追踪全流程。适用于登录流、支付流程等高价值路径的回归测试用例编写。运行前需确认本地服务端口与夹具数据可用性,区分模拟环境与真实依赖。

测试通过不应成为修改业务逻辑的理由,需警惕误判导致的副作用。

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

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

playwright-e2e-testing 怎么安装?

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

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

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

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

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

playwright-e2e-testing 是免费的吗?

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

playwright-e2e-testing 用的人多吗?

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

playwright-e2e-testing 安全吗?

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

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

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

不太适合

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

研究检索类 Skill 对比

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

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
playwright-e2e-testing

Playwright E2E 测试 · 本页

1941操作浏览器未明确未通过

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

SKILL.md 原文

Playwright E2E Testing

Quick Start

Test a login flow with evidence collection:

You: "Test the login flow at http://localhost:3000"

Claude: [Runs E2E test with]:
1. Initial state capture (snapshot + screenshot)
2. Form interaction (username/password)
3. Console error monitoring
4. Network request verification
5. Final state capture
6. Comprehensive test report

Result: Complete test report with screenshots, console logs, network activity, and pass/fail status.

Table of Contents

  1. When to Use This Skill
  2. What This Skill Does
  3. E2E Testing Workflow 3.1. Initial State Capture 3.2. Test Execution 3.3. Evidence Collection 3.4. Final Verification 3.5. Report Generation
  4. Common Test Scenarios
  5. Supporting Files
  6. Expected Outcomes
  7. Requirements
  8. Red Flags to Avoid

When to Use This Skill

Explicit Triggers

  • "Test the user flow for [feature]"
  • "Run E2E test on [URL]"
  • "Validate the [workflow/form/checkout] process"
  • "Check if [feature] works end-to-end"
  • "Automated testing for [scenario]"
  • "Verify [user journey]"

Implicit Triggers

  • Need to validate multi-step workflows (login, checkout, signup)
  • Regression testing after changes
  • Collecting evidence for bug reports
  • Verifying form submissions work correctly
  • Testing SPA navigation and state changes
  • Validating API interactions from browser

Debugging Triggers

  • "Why is [feature] not working?"
  • "Check console for errors during [action]"
  • "Monitor network requests during [workflow]"
  • "Capture evidence of [bug]"

What This Skill Does

This skill standardizes end-to-end testing with comprehensive evidence collection:

  1. State Capture - Takes snapshots and screenshots before and after tests
  2. Interaction Execution - Fills forms, clicks buttons, navigates pages
  3. Error Monitoring - Watches console for errors and warnings
  4. Network Verification - Tracks API calls and responses
  5. Evidence Collection - Generates reports with all artifacts
  6. Pass/Fail Determination - Validates expected outcomes

E2E Testing Workflow

3.1. Initial State Capture

Purpose: Establish baseline before test execution

Step 1: Navigate to application
  browser_navigate(url="http://localhost:3000")

Step 2: Wait for page load
  browser_wait_for(time=2)

Step 3: Capture accessibility snapshot
  browser_snapshot()
  → Save as "initial-state.md"

Step 4: Take screenshot
  browser_take_screenshot(filename="initial-state.png")

Why this matters: Initial state provides context for test failures and debugging.

3.2. Test Execution

Purpose: Execute user interactions systematically

Step 1: Identify form elements
  browser_snapshot()
  → Find refs for input fields

Step 2: Fill form fields
  browser_fill_form(fields=[
    {name: "Email", ref: "ref_5", type: "textbox", value: "user@test.com"},
    {name: "Password", ref: "ref_6", type: "textbox", value: "password123"}
  ])

Step 3: Submit form
  browser_click(element="Login button", ref="ref_7")

Step 4: Wait for response
  browser_wait_for(text="Welcome")

Pattern: Snapshot → Identify refs → Interact → Verify

3.3. Evidence Collection

Purpose: Gather diagnostic information during test

Step 1: Check console messages
  browser_console_messages(level="error")
  → Capture any errors/warnings

Step 2: Monitor network requests
  browser_network_requests()
  → Verify API calls succeeded

Step 3: Capture intermediate states
  browser_take_screenshot(filename="step-2-after-login.png")

Evidence types:

  • Console logs (errors, warnings, info)
  • Network requests (status codes, URLs, timing)
  • Screenshots (visual confirmation)
  • Accessibility snapshots (DOM state)

3.4. Final Verification

Purpose: Validate test success criteria

Step 1: Verify expected elements
  browser_snapshot()
  → Check for success indicators

Step 2: Capture final state
  browser_take_screenshot(filename="final-state.png")

Step 3: Check for errors
  browser_console_messages(level="error")
  → Ensure no errors during workflow

Success criteria:

  • Expected text/elements present
  • No console errors
  • Network requests succeeded (2xx status codes)
  • Final state matches expectations

3.5. Report Generation

Purpose: Create comprehensive test documentation

Use scripts/generate_test_report.py:

python scripts/generate_test_report.py \
  --test-name "Login Flow" \
  --initial-snapshot initial-state.md \
  --final-snapshot final-state.md \
  --screenshots initial-state.png,final-state.png \
  --console-logs console.json \
  --network-requests network.json \
  --output test-report.md

Report includes:

  • Test metadata (name, URL, timestamp)
  • Pass/fail status with reasoning
  • Console error summary
  • Network request summary
  • Screenshot gallery
  • Accessibility snapshots
  • Recommendations for failures

See references/report-template.md for structure.

Common Test Scenarios

Login Flow: Navigate → Capture state → Fill credentials → Submit → Wait for success → Verify console/network → Capture final state → Report

Form Submission: Navigate → Capture state → Fill fields → Submit → Wait for confirmation → Verify POST request → Check validation → Capture state → Report

Multi-Step Checkout: Add to cart → Checkout → Fill shipping/payment (capture each) → Submit order → Verify confirmation → Check all APIs → Report

SPA Navigation: Navigate → Click nav links → Verify URL changes → Check content updates → Monitor console/network → Capture states → Report

See examples/examples.md for 10+ detailed scenarios with complete code.

Supporting Files

scripts/ - generate_test_report.py (creates markdown reports), setup_test_env.py (initializes directories)

references/ - report-template.md (report structure), troubleshooting.md (common issues/solutions)

examples/ - examples.md (10+ complete test scenarios with code)

Expected Outcomes

Successful Test

✅ Test Passed: Login Flow

Test Summary:
- URL: http://localhost:3000/login
- Duration: 5.2 seconds
- Steps: 4
- Console Errors: 0
- Network Failures: 0

Evidence:
- Initial state: initial-state.png
- Final state: final-state.png
- Accessibility snapshots: 2
- Network requests: 3 (all 200 OK)

Verification:
✅ "Welcome, User" text found
✅ No console errors
✅ POST /api/login returned 200
✅ Dashboard loaded successfully

Full report: test-reports/login-flow-2025-12-20.md

Failed Test

❌ Test Failed: Login Flow

Test Summary:
- URL: http://localhost:3000/login
- Duration: 3.1 seconds (stopped early)
- Steps: 2 of 4 completed
- Console Errors: 2
- Network Failures: 1

Failure Reason:
Network request POST /api/login returned 401 Unauthorized

Console Errors:
1. [Error] Authentication failed: Invalid credentials
2. [Error] Uncaught TypeError: Cannot read property 'token' of undefined

Evidence:
- Initial state: initial-state.png
- Error state: error-state.png
- Network log: network.json

Recommendations:
1. Check API endpoint credentials
2. Verify authentication token handling
3. Add error handling for failed login attempts

Full report: test-reports/login-flow-failed-2025-12-20.md

Requirements

Tools:

  • Playwright MCP tools (browser_navigate, browser_snapshot, etc.)
  • Python 3.8+ (for report generation scripts)
  • Write access to test output directory

Environment:

  • Application running and accessible (local or remote)
  • Network connectivity for API calls
  • Sufficient disk space for screenshots

Knowledge:

  • Basic understanding of web application flows
  • Familiarity with CSS selectors or accessibility roles
  • Understanding of HTTP status codes

Red Flags to Avoid

Testing Anti-Patterns:

  • Starting test without capturing initial state
  • Ignoring console errors during test execution
  • Not verifying network requests succeeded
  • Skipping final state capture
  • Proceeding with test after clear failure
  • Not waiting for async operations to complete
  • Using hardcoded waits instead of wait_for text/elements
  • Generating report without all evidence files

Evidence Collection:

  • Missing screenshots for critical steps
  • Not checking console messages after interactions
  • Ignoring network request failures
  • Not capturing intermediate states for multi-step flows

Report Quality:

  • Vague test names ("Test 1", "Flow 2")
  • Missing pass/fail criteria
  • No recommendations for failures
  • Incomplete evidence references

Security:

  • Including credentials in screenshots
  • Committing sensitive test data to git
  • Exposing API keys in network logs
  • Sharing test reports with PII

Notes

Best Practices:

  1. Always capture initial and final state (snapshot + screenshot)
  2. Check console after every significant interaction
  3. Verify network requests for expected status codes
  4. Use descriptive test names and step descriptions
  5. Generate reports immediately after test completion
  6. Store test artifacts in organized directory structure

Performance Tips:

  • Use browser_wait_for(text="...") instead of fixed time waits
  • Take screenshots only at key steps (not every interaction)
  • Filter console messages by level to reduce noise
  • Clear network requests between test runs

Integration:

  • Combine with CI/CD for automated regression testing
  • Use with bug tracking to attach evidence to issues
  • Share reports with team for test documentation
  • Archive test artifacts for historical analysis

平台分布

Codex

33.92%
按下载量换算21

Claude

29.47%
按下载量换算19

Cursor

20.23%
按下载量换算13

Gemini CLI

9.9%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

操作浏览器

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

安装前确认

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

继续浏览同类 Skills