Token导航 LogoToken导航

Agent Skill · 开发

webapp-testing(Web 应用测试)

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

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

总安装 343周安装 14GitHub Stars 9下载 110核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/autumnsgrove/claudeskills --skill webapp-testing

这个 Skill 是做什么的

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

webapp-testing 用于辅助测试设计、自动化测试、用例整理和回归验证,适合编写单元测试、端到端测试或定位失败日志问题。基于 Playwright 框架,支持多浏览器(Chromium、Firefox、WebKit)自动化交互和网络请求控制。

可创建 UI/UX 功能验证、模拟 API 响应、捕获截图与视频,提升测试覆盖率和调试效率。使用时需确认项目测试框架、运行命令和夹具数据,避免为了通过测试而破坏真实逻辑。涉及浏览器或外部服务时,应区分本地模拟、测试环境与生产环境,防止意外影响线上系统。

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

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

webapp-testing 怎么安装?

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

webapp-testing 支持哪些 AI 工具?

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

webapp-testing 需要什么权限?

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

webapp-testing 是免费的吗?

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

webapp-testing 用的人多吗?

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

webapp-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有提醒
webapp-testing

Web 应用测试 · 本页

3439操作浏览器MIT未通过

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

SKILL.md 原文

Web Application Testing with Playwright

Overview

Playwright is a powerful framework for web testing and automation that supports all modern browsers (Chromium, Firefox, WebKit). It provides reliable, fast, and capable automation with auto-waiting, network control, and comprehensive testing capabilities.

Use this skill when you need to:

  • Create end-to-end tests for web applications
  • Automate browser interactions and workflows
  • Test across multiple browsers and devices
  • Verify UI/UX functionality and accessibility
  • Mock APIs and intercept network requests
  • Capture screenshots and videos for debugging

Core Capabilities

Multi-Browser Testing

  • Chromium (Chrome, Edge, Brave)
  • Firefox (Mozilla Firefox)
  • WebKit (Safari engine)
  • Cross-browser compatibility testing
  • Parallel execution across browsers

Element Interaction

  • Click, double-click, right-click
  • Type text with realistic keyboard simulation
  • Select dropdowns and checkboxes
  • Hover and focus interactions
  • Drag and drop operations
  • File uploads and downloads

Assertions & Verification

  • Element visibility and state checks
  • Text content verification
  • Attribute validation
  • URL and navigation assertions
  • Custom expect matchers
  • Soft assertions for multiple checks

Screenshot & Video Capture

  • Full page screenshots
  • Element-specific captures
  • Video recording of test sessions
  • Visual comparison testing
  • Trace files for debugging

Network Interception

  • Mock API responses
  • Intercept and modify requests
  • Monitor network traffic
  • Test offline scenarios
  • Performance monitoring

Mobile Device Emulation

  • 100+ device presets (iPhone, Pixel, iPad, etc.)
  • Custom viewport configurations
  • Touch event simulation
  • Geolocation testing
  • Orientation changes

Core Testing Workflow

1. Basic Test Setup

Create a simple test with Playwright's auto-waiting:

import pytest
from playwright.sync_api import Page, expect

def test_homepage_loads(page: Page):
    """Test that homepage loads successfully."""
    page.goto("https://example.com")
    expect(page).to_have_title("Example Domain")
    expect(page.locator("h1")).to_contain_text("Example Domain")

def test_navigation(page: Page):
    """Test navigation between pages."""
    page.goto("https://example.com")
    page.click("text=More information")
    expect(page).to_have_url("https://www.iana.org/domains/reserved")

2. Form Interactions

Test form filling, validation, and submission:

def test_login_form(page: Page):
    """Test login form submission."""
    page.goto("https://example.com/login")

    # Fill form fields
    page.fill("#username", "testuser@example.com")
    page.fill("#password", "SecurePassword123")
    page.check("#remember-me")

    # Submit and verify
    page.click("button[type='submit']")
    expect(page).to_have_url("https://example.com/dashboard")
    expect(page.locator(".welcome-message")).to_be_visible()

3. API Mocking

Mock API responses for controlled testing:

def test_with_mocked_api(page: Page):
    """Test with mocked API response."""
    # Mock API response
    page.route("**/api/user", lambda route: route.fulfill(
        status=200,
        content_type="application/json",
        body='{"name": "Test User", "premium": true}'
    ))

    page.goto("https://example.com/profile")
    expect(page.locator(".user-name")).to_contain_text("Test User")

4. Mobile Emulation

Test responsive designs on mobile devices:

@pytest.fixture
def mobile_page(playwright):
    """Create mobile browser context."""
    iphone = playwright.devices['iPhone 12']
    browser = playwright.chromium.launch()
    context = browser.new_context(**iphone)
    page = context.new_page()
    yield page
    context.close()
    browser.close()

def test_mobile_menu(mobile_page: Page):
    """Test mobile navigation."""
    mobile_page.goto("https://example.com")
    expect(mobile_page.locator(".hamburger-menu")).to_be_visible()
    mobile_page.click(".hamburger-menu")
    expect(mobile_page.locator(".mobile-menu")).to_be_visible()

5. Visual Regression

Capture screenshots for visual comparison:

def test_homepage_screenshot(page: Page):
    """Capture homepage screenshot."""
    page.goto("https://example.com")

    # Full page screenshot
    page.screenshot(path="screenshots/homepage.png", full_page=True)

    # Element screenshot
    page.locator("header").screenshot(path="screenshots/header.png")

    # Screenshot with masks for dynamic content
    page.screenshot(
        path="screenshots/dashboard.png",
        mask=[page.locator(".timestamp"), page.locator(".session-id")]
    )

Key Testing Principles

Use Reliable Selectors

# ✅ GOOD: Test IDs and semantic selectors
page.click("[data-testid='submit-button']")
page.click("button:text('Submit')")
page.click("role=button[name='Submit']")

# ❌ BAD: Fragile structural selectors
page.click("div > div > button:nth-child(3)")

Leverage Auto-Waiting

# ✅ GOOD: Playwright auto-waits
page.click("button")
expect(page.locator(".result")).to_be_visible()

# ⚠️ Avoid: Manual waits
time.sleep(2)  # Only when absolutely necessary

Ensure Test Isolation

# ✅ GOOD: Clean state between tests
@pytest.fixture(autouse=True)
def clear_state(page: Page):
    yield
    page.context.clear_cookies()
    page.evaluate("localStorage.clear()")

Handle Flaky Tests

# ✅ GOOD: Wait for specific conditions
page.click("button")
page.wait_for_selector(".result")
result = page.locator(".result").text_content()

# ✅ GOOD: Use soft assertions
expect.soft(page.locator(".title")).to_be_visible()
expect.soft(page.locator(".price")).to_contain_text("$")

Page Object Model

Organize tests using the Page Object pattern for maintainability:

class LoginPage:
    """Login page object."""

    def __init__(self, page: Page):
        self.page = page
        self.username_input = page.locator("#username")
        self.password_input = page.locator("#password")
        self.submit_button = page.locator("button[type='submit']")

    def login(self, username: str, password: str):
        """Perform login."""
        self.username_input.fill(username)
        self.password_input.fill(password)
        self.submit_button.click()

# Use in tests
def test_login(page: Page):
    login_page = LoginPage(page)
    login_page.login("test@example.com", "password123")
    expect(page).to_have_url("/dashboard")

Common Test Patterns

Authentication

@pytest.fixture
def authenticated_page(page: Page):
    """Provide authenticated session."""
    page.goto("https://example.com/login")
    page.fill("#username", "test@example.com")
    page.fill("#password", "password")
    page.click("button[type='submit']")
    page.wait_for_url("**/dashboard")
    yield page

File Operations

# Upload
page.set_input_files("#file-input", "path/to/file.pdf")

# Download
with page.expect_download() as download_info:
    page.click("a:text('Download')")
download = download_info.value
download.save_as("downloads/file.pdf")

Network Monitoring

requests = []
page.on("request", lambda req: requests.append(req))
page.goto("https://example.com")

# Verify API calls were made
api_requests = [r for r in requests if "/api/" in r.url]
assert len(api_requests) > 0

Running Tests

Basic Commands

# Install Playwright
pip install playwright pytest-playwright
playwright install

# Run all tests
pytest tests/

# Run specific browser
pytest --browser chromium --browser firefox

# Run in headed mode (see browser)
pytest --headed

# Debug mode
PWDEBUG=1 pytest tests/test_login.py

# Parallel execution
pytest -n auto

# Generate test code
playwright codegen https://example.com

Configuration

See references/setup-configuration.md for:

  • Complete installation instructions
  • Project structure setup
  • pytest.ini configuration
  • playwright.config.ts for TypeScript
  • CI/CD integration examples

Quality Standards

Ensure tests meet these criteria:

  • Tests are independent and can run in any order
  • Selectors are reliable (test IDs, semantic selectors)
  • Proper error handling and assertions
  • Screenshots/videos captured on failure
  • No hardcoded waits (use auto-waiting)
  • Clean state management between tests

Additional Resources

Detailed Documentation

Code Examples

Helper Scripts

External Resources

Troubleshooting

Tests are flaky:

  • Use Playwright's auto-waiting instead of manual sleeps
  • Ensure proper wait conditions (wait_for_selector, wait_for_url)
  • Use expect() assertions which auto-retry

Selectors not finding elements:

  • Verify element exists with browser DevTools
  • Use Playwright Inspector: PWDEBUG=1 pytest test.py
  • Try multiple selector strategies (text, role, test-id)

Tests slow in CI:

  • Enable parallel execution: pytest -n auto
  • Use headed mode only for debugging
  • Consider browser context reuse for related tests

For more troubleshooting tips, see Common Pitfalls.

平台分布

windsurf

28.07%
按下载量换算31

OpenCode

22.04%
按下载量换算24

Codex

18.97%
按下载量换算21

Claude Code

11.64%
按下载量换算13

Antigravity

8.2%
按下载量换算9

Gemini CLI

3.27%
按下载量换算4

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

操作浏览器

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

安装前确认

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

继续浏览同类 Skills