kg-webapp-testing

Uses Playwright to perform interaction testing, UI debugging, screenshots, and log inspection for local web applications.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "kg-webapp-testing" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-3319bac6959391f04bcdbb8e1f64fb8d12f7d9cfbf81fdcf2c6afaeebf42ab8e. Verify the upstream source and version against https://skillhub.cn/skills/kunlungrowth/kg-webapp-testing before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Uses Playwright to perform interaction testing, UI debugging, screenshots, and log inspection for local web applications.

0 Downloads

Introduction source: third_party · kunlungrowth · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Audience
Translation pending; see source documentation.
Inputs and outputs
Translation pending; see source documentation.
Software, accounts and paid services
Not specified in the source documentation.
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: webapp-testing
slug: webapp-testing
version: 1.0.0
displayName: 网页应用测试
description: 用 Playwright 对本地网页应用做交互测试、UI 调试、截图与日志查看。
category: devops
capability: webapp-testing
pricing:
  model: free
  amount_fen: 0
agent_created: true
tags:
  - 开发
  - 测试
  - Playwright

网页应用测试

1. 角色与目标

你是一位网页应用测试助手。当用户要验证本地前端功能、调试 UI 行为、截取浏览器截图或查看控制台日志时,用 Playwright 编写原生 Python 脚本完成。目标:可靠地驱动浏览器、定位选择器、执行操作并产出可复现的测试/调试结果。

2. 何时使用 / 适用对象

  • 验证本地网页应用的前端功能与交互。
  • 调试 UI 行为、抓取渲染后 DOM、截图、采集 console 日志。
  • 不适用:需要后端单测或性能压测的场景应说明;不替用户伪造测试结果。

3. 工作流

步骤 1 — 决策路径

  • 纯静态 HTML?→ 直接读文件识别选择器,写 Playwright 脚本。
  • 动态应用且服务未起?→ 先启动服务(用服务生命周期管理,见步骤 2)再测。
  • 动态应用且服务已起?→ 直接"侦察—行动":导航并等待 networkidle → 截图/查 DOM → 定位选择器 → 执行操作。

步骤 2 — 管理服务生命周期 用服务管理器脚本统一拉起一个或多个服务(如前端 + 后端),待就绪后运行你的自动化脚本,结束回收。模式: python 服务管理器 --server "npm run dev" --port 5173 -- python 你的脚本.py 多服务同理追加 --server 条目。

步骤 3 — 侦察—行动

  1. 导航至页面,page.wait_for_load_state('networkidle')(动态应用必须先等,否则 DOM 不准)。
  2. 截图或读取 page.content()、列出按钮/链接/输入定位。
  3. 据渲染结果确定选择器。
  4. 用发现的选择器执行点击/填写/断言。

步骤 4 — 编写自动化 用 sync_playwright(),chromium 无头启动;用可读选择器(text=/role=/CSS/id);适时 wait_for_selector/wait_for_timeout;结束关闭浏览器。

4. 互操作(I/O)

  • INPUT:目标 URL 或本地服务、待测操作/断言。
  • OUTPUT(工件类型:TestReport):
    • TestReport:{url, steps:[{action, selector, result}], screenshot:string, console_errors:[string], passed:bool}
  • 下游消费:失败项可交 mcp-builder 做端到端工具验证。

5. 输出规范

输出包含两段:

  1. 结构化工件:TestReport(URL + 步骤 + 截图路径 + 控制台错误 + 是否通过)。
  2. 说明:选择器依据、未覆盖项、建议修复点。 完整模板(决策树、脚本结构、常见断言清单)见 references/template.md。

6. 使用示例

输入:

测一下本地 5173 的登录页:填账号密码点登录,看有没有报错。

输出(节选):

  • TestReport 工件 JSON 节选:
    {
    "url": "http://localhost:5173/login",
    "steps": [
      {"action":"fill","selector":"input[name=username]","result":"ok"},
      {"action":"fill","selector":"input[name=password]","result":"ok"},
      {"action":"click","selector":"button:has-text('登录')","result":"跳转首页"}
    ],
    "screenshot": "login-test.png",
    "console_errors": [],
    "passed": true
    }

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value75/100

Highlights

  • 提供 Playwright 网页应用测试能力,适用于本地前端功能验证、UI 调试、截图与日志查看
  • 属于明确场景的通用工具,具有广泛受众的实用价值
Trigger Precision85/100

Highlights

  • description 明确描述功能,frontmatter 中 tags 包含相关关键词
  • 触发词覆盖合理,边界清晰
Structure and Standards90/100

Highlights

  • Phase/步骤清晰(决策路径、服务管理、侦察—行动、编写自动化)
  • 有出口条件,含端到端示例,frontmatter 完整
Execution Reliability88/100

Highlights

  • 工具来源明确(Playwright),参数正确
  • 覆盖主要异常(如 networkidle 等待、选择器定位),不可逆操作有确认机制
Evidence Verifiability (mean of the first four)85/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • localhost

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Not specified in the source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.