dmsobtl/dsh-tool-app-verify0

dsh-tool-app-verify

DSH plugin: browser & Electron UI operation and verification — actions, assertions, and visual regression testing.

AI Analysis

核心用途是自动化 UI 测试。适合需要让智能体自动操作浏览器或桌面应用、验证界面元素并截图对比的测试人员。

Package
dsh-tool-app-verify
Version
0.1.0
Last updated
Aug 14, 2026

Install

This plugin has no verified bundle, or compatibility checks failed. Read the repository notes first. Read the full README ↗

配置

- id: app-verify
  plugin: dsh-tool-app-verify
  config:
    mode: browser           # browser | electron
    headless: true
    timeout: 30000
    baselinePath: .app-verify/baselines
    diffThreshold: 0.1      # pixelmatch 容差
    viewport:
      width: 1280
      height: 720

使用示例

Browser 模式

User: 打开我们的登录页,验证登录按钮存在且可点击

Agent:
→ app_launch({ target: "http://localhost:3000/login" })
→ app_verify({ selector: "role:button[name=\"登录\"]", assertion: "visible" })
→ app_screenshot({ saveAs: "login-page" })
✓ 登录按钮存在且可见,已保存截图基线。

Electron 模式

User: 启动我们的桌面应用,检查主窗口标题

Agent:
→ app_launch({ target: "./dist/main.js", mode: "electron" })
→ app_verify({ selector: "role:heading", assertion: "text_contains", expected: "Dashboard" })
✓ 主窗口标题包含 "Dashboard"。

视觉回归测试

User: 对比当前首页和上次的基线截图

Agent:
→ app_launch({ target: "http://localhost:3000" })
→ app_screenshot_diff({ baseline: "homepage" })
结果:匹配度 97.3%,有差异区域已高亮显示。