Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问许可证需确认审计提醒

app-testing应用程序测试

Agent Skill

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

总安装

312

周安装

13

GitHub Stars

1

下载量

104
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/alfredang/skills --skill app-testing

简介

用于在本地或远程站点上测试 Web 应用功能与移动端响应式表现。

  • 基于 Playwright 实现浏览器自动化,支持表单填写、链接跳转与 UI 验证。
  • 可检测按钮、导航与链接可用性,输出结构化测试报告。
  • 需指定目标 URL 并确认网络可达性后方可执行测试任务。
  • 区分测试环境与生产环境,避免对线上服务造成意外影响。

SKILL.md

App Testing

Test application functionality and mobile responsiveness on localhost or remote live sites using Playwright MCP browser automation. Navigates pages, interacts with elements, validates content, tests mobile-friendliness across device viewports, and reports results.

Command

/test-app or test-app

Navigate

Testing & QA

Keywords

test app, test site, test my app, test my site, test localhost, test live site, functional test, ui test, smoke test, e2e test, end to end test, test buttons, test forms, test navigation, test links, playwright test, browser test, test functionality, qa test, test page, test deployed site, test production, verify app, check app works, test-app, test mobile, mobile friendly, responsive test, mobile view, mobile responsiveness, test on phone, mobile testing, responsive design test, viewport test

Description

Uses Playwright MCP to launch a browser, navigate to your app (localhost or remote URL), and systematically test functionality and mobile responsiveness. Takes snapshots to understand page structure, interacts with elements (clicks, types, selects), validates expected behavior, resizes the browser to mobile/tablet viewports to verify responsive design, and generates a test report with pass/fail results and screenshots of failures.

Execution

This skill runs using Claude Code with subscription plan. Requires the Playwright MCP server to be configured and available. All browser interactions use Playwright MCP tools (browser_navigate, browser_snapshot, browser_click, browser_type, etc.).

Response

I'll test your app's functionality using Playwright MCP!

The workflow includes:

StepDescription
DiscoverDetermine target URL (localhost or remote)
SnapshotTake accessibility snapshot to understand page structure
PlanIdentify testable elements and user flows
ExecuteRun through test scenarios interacting with the app
ValidateCheck expected outcomes after each interaction
MobileTest responsiveness across mobile and tablet viewports
ReportGenerate test summary with pass/fail results

Instructions

When executing /test-app, follow this workflow:

Phase 0: Determine Target URL

The user may provide a URL directly or you need to detect it:

  1. If user provides a URL (e.g., test-app https://mysite.com or test-app localhost:3000):

- Use the provided URL directly - If just a domain without protocol, prepend https:// - If localhost without port, try common ports: 3000, 5173, 8080, 8000, 4321

  1. If no URL provided, auto-detect:

- Check for running localhost servers by scanning common ports: for port in 3000 5173 8080 8000 4321 8501 5000 9292; do lsof -ti:$port >/dev/null 2>&1 && echo "Found server on port $port" done - If exactly one server is found, use it - If multiple servers found, ask the user which one to test - If no server found, check for a deployed URL: - Look for vercel.json, .vercel/project.json for Vercel deployments - Look for CNAME file or .github/workflows for GitHub Pages - Check package.json for homepage field - If nothing found, ask the user for the URL

  1. Validate the target is reachable: curl -s -o /dev/null -w "%{http_code}" <URL> 2>/dev/null

- If the response is not 2xx or 3xx, inform the user the target is unreachable - For localhost, ensure the server is running first (suggest /start-app if not)

Phase 1: Initial Page Load & Snapshot

Navigate to the target URL and capture the initial state:

  1. Navigate to the app: Use browser_navigate to open the target URL.
  2. Take accessibility snapshot: Use browser_snapshot to get the full page structure. This returns a structured representation of all interactive elements, text content, links, buttons, forms, and navigation.
  3. Take a screenshot for visual reference: Use browser_take_screenshot to capture the initial visual state.
  4. Analyze the page structure: From the snapshot, identify:

- Navigation menus and links - Buttons and interactive elements - Forms and input fields - Main content areas - Dynamic elements (dropdowns, modals, tabs) - Error messages or broken elements

Phase 2: Plan Test Scenarios

Based on the page snapshot, plan test scenarios organized by priority:

2.1 Critical Path Tests (always run)

  • Page loads successfully — no error states, main content renders
  • Navigation works — all nav links are clickable and lead to valid pages
  • No console errors — check browser_console_messages for errors
  • No broken network requests — check browser_network_requests for failed calls

2.2 Interactive Element Tests

  • Buttons — click each visible button and verify expected behavior
  • Links — verify internal links navigate correctly, external links exist
  • Forms — fill in form fields and submit, verify validation messages
  • Dropdowns/Selects — open and select options
  • Tabs/Accordions — toggle and verify content changes
  • Modals/Dialogs — trigger and verify they open/close properly

2.3 Content Validation Tests

  • Text content — verify headings, paragraphs, and labels are present
  • Images — verify images load (no broken image indicators)
  • Lists/Tables — verify data renders correctly
  • Dynamic content — verify content loads after API calls

2.4 User Flow Tests (if applicable)

Identify common user flows based on the app type:

  • Auth apps — login/signup/logout flow
  • E-commerce — browse/add to cart/checkout flow
  • Forms — fill/validate/submit flow
  • Dashboards — navigate between views, filter/sort data
  • Landing pages — CTA buttons, anchor links, contact forms

Phase 3: Execute Tests

Run each test scenario using Playwright MCP tools. For each test:

  1. Snapshot before action — use browser_snapshot to understand current state
  2. Perform the action — use the appropriate Playwright MCP tool:

- browser_click — for buttons, links, tabs - browser_type — for text inputs - browser_fill_form — for multiple form fields - browser_select_option — for dropdowns - browser_press_key — for keyboard interactions (Enter, Escape, Tab) - browser_hover — for hover states and tooltips - browser_navigate — for direct URL navigation - browser_navigate_back — to return to previous page

  1. Snapshot after action — use browser_snapshot to verify the result
  2. Validate — check that the expected outcome occurred:

- Element appeared/disappeared - Text changed - Page navigated - Form submitted successfully - Error message displayed for invalid input

  1. Screenshot on failure — if a test fails, use browser_take_screenshot to capture the failure state

Test Execution Rules

  • Wait for dynamic content — use browser_wait_for when expecting async changes
  • Handle dialogs — use browser_handle_dialog if alerts/confirms appear
  • Check console — periodically use browser_console_messages to catch JS errors
  • Check network — use browser_network_requests to catch failed API calls
  • Navigate back — after testing a sub-page, navigate back to continue testing
  • Use tabs — use browser_tabs to manage multiple pages if needed

Phase 4: Multi-Page Testing

If the app has multiple pages/routes:

  1. Collect all navigation links from the snapshot
  2. Visit each page and run Phase 1 (snapshot + basic validation) on each
  3. Test cross-page flows (e.g., add to cart on page A, verify cart on page B)
  4. Test browser back/forward navigation

For single-page apps (SPAs):

  • Test client-side routing by clicking nav elements
  • Verify URL changes in the browser
  • Test deep linking by navigating directly to routes

Phase 5: Mobile Responsiveness Testing

After desktop testing, resize the browser to test mobile-friendliness across common device viewports. This phase ensures the app works well on phones and tablets.

5.1 Define Test Viewports

Test at these standard device sizes (width x height):

DeviceWidthHeightCategory
iPhone SE375667Small phone
iPhone 14 / 15390844Standard phone
iPhone 14 Pro Max430932Large phone
iPad Mini7681024Small tablet
iPad Air / Pro8201180Standard tablet

At minimum, always test these 3 viewports:

  1. Small phone (375×667) — catches tight layout issues
  2. Standard phone (390×844) — most common mobile device
  3. Tablet (768×1024) — catches tablet breakpoint issues

5.2 Mobile Test Execution

For each viewport, perform the following:

  1. Resize the browser: Use browser_resize to set the viewport dimensions: browser_resize(width: 375, height: 667) // iPhone SE
  2. Navigate to the main page: Use browser_navigate to reload the app at the target URL (ensures fresh responsive layout).
  3. Take a screenshot: Use browser_take_screenshot to capture the mobile layout for visual reference.
  4. Take an accessibility snapshot: Use browser_snapshot to get the page structure at this viewport size.
  5. Check for mobile layout issues:

- Horizontal overflow — look for horizontal scrollbars or content extending beyond the viewport. Use browser_evaluate to check: () => document.documentElement.scrollWidth > document.documentElement.clientWidth - Viewport meta tag — verify the page has a proper viewport meta tag. Use browser_evaluate: () => {const meta = document.querySelector('meta[name="viewport"]'); return meta? meta.getAttribute('content'): 'MISSING';} - Touch target sizes — verify buttons and links are at least 44x44px for tap accessibility. Use browser_evaluate: () => {const issues = []; document.querySelectorAll('a, button, [role="button"], input, select, textarea').forEach(el => {const rect = el.getBoundingClientRect(); if (rect.width > 0 && rect.height > 0 && (rect.width < 44 || rect.height < 44)) {issues.push({tag: el.tagName, text: el.textContent?.slice(0, 30), width: Math.round(rect.width), height: Math.round(rect.height)});}}); return issues.length > 0? issues: 'ALL PASS';} - Text readability — check that body font size is at least 16px (prevents auto-zoom on iOS). Use browser_evaluate: () => {const body = document.body; const fontSize = parseFloat(window.getComputedStyle(body).fontSize); const inputs = document.querySelectorAll('input, textarea, select'); const smallInputs = []; inputs.forEach(el => {const size = parseFloat(window.getComputedStyle(el).fontSize); if (size < 16) smallInputs.push({tag: el.tagName, type: el.type, fontSize: size});}); return {bodyFontSize: fontSize, inputsBelow16px: smallInputs.length > 0? smallInputs: 'NONE'};}

  1. Test mobile navigation:

- Hamburger menu — look for a hamburger/menu icon button in the snapshot. If found: - Click it with browser_click - Snapshot to verify the mobile nav menu opens - Verify all navigation links are visible and clickable - Click each nav link to verify it works - Verify the menu can be closed (click hamburger again, click outside, or press Escape) - Sticky/fixed headers — scroll down and verify header stays visible if sticky. Use browser_evaluate: () => {window.scrollTo(0, 500); const header = document.querySelector('header, nav, [role="banner"]'); if (!header) return 'NO HEADER FOUND'; const rect = header.getBoundingClientRect(); return {isVisible: rect.top >= 0 && rect.bottom <= window.innerHeight, top: rect.top};} - Bottom navigation — if a mobile bottom nav exists, verify it stays fixed at bottom

  1. Test mobile-specific interactions:

- Scroll behavior — use browser_evaluate to scroll and verify smooth scrolling works: () => {window.scrollTo({top: document.body.scrollHeight, behavior: 'smooth'}); return 'scrolled to bottom';} - Forms on mobile — verify form fields are usable (not hidden behind keyboard, proper input types) - Modals/overlays — if tested in desktop phase, re-test that modals fit within mobile viewport - Images — verify images scale down and don't overflow the viewport - Tables — check if tables have horizontal scroll wrappers or responsive alternatives

  1. Test content stacking:

- Verify multi-column layouts properly stack to single-column on mobile - Check that sidebars collapse or move below main content - Verify cards/grid items reflow properly

5.3 Responsive Breakpoint Transitions

After testing individual viewports, test the transition between breakpoints:

  1. Start at desktop (1280×800) with browser_resize
  2. Step down through breakpoints:

- 1024×768 (small desktop / landscape tablet) - 768×1024 (tablet portrait) - 390×844 (phone)

  1. At each step, take a snapshot and screenshot to verify:

- Layout transitions smoothly (no broken intermediate states) - Navigation switches between desktop and mobile modes at an appropriate breakpoint - Content remains accessible at every width

5.4 Restore Desktop Viewport

After mobile testing, restore the browser to desktop size:

browser_resize(width: 1280, height: 800)

Phase 6: Generate Test Report

After all tests complete, generate a structured report:

## Test Report

**Target:** <URL>
**Date:** <current date/time>
**Total Tests:** <count>
**Passed:** <count>  |  **Failed:** <count>  |  **Skipped:** <count>

### Results

| # | Test | Status | Details |
|---|------|--------|---------|
| 1 | Page loads successfully | PASS | Main content rendered in <X>ms |
| 2 | Navigation - Home link | PASS | Navigated to / |
| 3 | Navigation - About link | PASS | Navigated to /about |
| 4 | Login form submission | FAIL | Expected redirect, got validation error |
| 5 | Contact form - empty submit | PASS | Validation messages displayed |
| ... | ... | ... | ... |

### Failures

#### Test 4: Login form submission
- **Action:** Filled email/password and clicked Submit
- **Expected:** Redirect to dashboard
- **Actual:** Validation error "Invalid credentials"
- **Screenshot:** [captured]

### Console Errors
- [error] Failed to load resource: /api/users (404)
- [warning] React: Each child in a list should have a unique "key" prop

### Network Issues
- GET /api/users → 404 Not Found
- POST /api/login → 500 Internal Server Error

### Mobile Responsiveness

| Viewport | Status | Issues |
|----------|--------|--------|
| iPhone SE (375×667) | PASS/FAIL | Details |
| iPhone 14 (390×844) | PASS/FAIL | Details |
| iPad Mini (768×1024) | PASS/FAIL | Details |

#### Mobile Issues Found
- **Horizontal overflow** on iPhone SE — content extends 40px beyond viewport
- **Touch targets too small** — 3 buttons under 44px height on mobile nav
- **Missing viewport meta tag** — page does not have `<meta name="viewport">`
- **Input font size < 16px** — email input has 14px font (causes iOS auto-zoom)
- **Hamburger menu not functional** — menu icon present but click has no effect

### Recommendations
- Fix the /api/users endpoint returning 404
- Add proper error handling for login failures
- Add alt text to images on the homepage
- Add `<meta name="viewport" content="width=device-width, initial-scale=1">` if missing
- Increase touch target sizes to minimum 44×44px
- Set input font sizes to at least 16px to prevent iOS auto-zoom
- Add responsive breakpoints for mobile layouts

Phase 7: Cleanup

After testing:

  1. Close the browser with browser_close
  2. Display the test report to the user
  3. If failures were found, offer to:

- Investigate specific failures in more detail - Re-run failed tests after fixes - Take additional screenshots

Advanced Usage

Testing with Arguments

Users can pass specific test targets:

  • /test-app — auto-detect URL, run all tests
  • /test-app http://localhost:3000 — test specific localhost
  • /test-app https://mysite.com — test remote site
  • /test-app https://mysite.com/login — test specific page
  • /test-app --forms — focus on form testing
  • /test-app --nav — focus on navigation testing
  • /test-app --a11y — focus on accessibility checks
  • /test-app --mobile — focus on mobile responsiveness testing only
  • /test-app --responsive — run full responsive test across all viewports

Testing Remote vs Local

Localhost testing:

  • Can test with hot-reload (changes reflect immediately)
  • Can test authenticated flows with test credentials
  • Can test API endpoints directly

Remote/live site testing:

  • Tests the deployed production build
  • Validates CDN, SSL, and production configs
  • Can catch deployment-specific issues
  • Respects rate limits and avoids destructive actions (no form submissions with real data unless explicitly requested)

Capabilities

  • Navigate to any localhost or remote URL via Playwright MCP
  • Take accessibility snapshots to understand full page structure
  • Click buttons, links, tabs, and any interactive elements
  • Fill and submit forms with test data
  • Validate page content, navigation, and UI behavior
  • Capture screenshots for visual verification and failure documentation
  • Check browser console for JavaScript errors
  • Monitor network requests for failed API calls
  • Test multi-page flows and SPA client-side routing
  • Handle browser dialogs (alerts, confirms, prompts)
  • Test mobile responsiveness by resizing to phone/tablet viewports (iPhone SE, iPhone 14, iPad Mini, etc.)
  • Detect mobile layout issues — horizontal overflow, small touch targets, missing viewport meta, font size issues
  • Test mobile navigation — hamburger menus, sticky headers, bottom nav bars
  • Verify responsive breakpoint transitions — layout changes smoothly from desktop to mobile
  • Generate structured test reports with pass/fail results including mobile responsiveness section

Notes

  • This skill requires Playwright MCP to be configured in Claude Code
  • For localhost testing, ensure the app is running first (use /start-app if needed)
  • The skill does NOT modify any application code — it only reads and interacts via the browser
  • Remote site testing avoids destructive actions by default (no real purchases, account deletions, etc.)
  • Form testing uses obviously fake test data (e.g., test@example.com, "Test User")
  • Screenshots are captured for failures to help debug issues
  • Console and network errors are always checked even if not explicitly requested

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

展示第三方安全扫描或审计结果

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

平台分布

Codex

38.64%
按下载量换算40

Claude

29.76%
按下载量换算31

Cursor

19.57%
按下载量换算20

Gemini CLI

9.89%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

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

安装前确认

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

来源信息

继续浏览同类 Skills