Token导航 LogoToken导航TokenDH.com
效率需要联网clawhub未标认证来源可访问clear审计通过

weapp-automated-testingweapp 自动化测试

Agent Skill

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

总安装

4,959

周安装

213

GitHub Stars

1

下载量

1,738
OpenClaw

安装说明

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

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:weapp-automated-testing(weapp 自动化测试)
来源仓库:https://github.com/eumenides-k/weapp-automated-testing
安装命令:
openclaw skills install weapp-automated-testing
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

ClawHubOpenClaw
openclaw skills install weapp-automated-testing

简介

专为微信小程序设计的自动化测试工具包,支持 DevTools 控制与元素交互。

  • 可用于端到端测试脚本编写、UI 回归验证及日志分析辅助。
  • 需配合微信开发者工具环境运行,不支持纯后端逻辑测试。
  • 截图与日志捕获依赖浏览器渲染,动态加载内容可能存在延迟。
  • 测试用例由 Agent 生成,执行结果仍需人工复核真实性。

SKILL.md

name
weapp-automatd-testing
description
WeChat Mini Program automation testing toolkit. Supports launching DevTools, page navigation, element interaction, screenshots, console log reading, and more. Use when the user needs to automate mini program testing, control WeChat DevTools, read console logs, or perform UI screenshot comparison.

WeChat Mini Program Automation Testing

CRITICAL: Batch Execution Rule

ALWAYS write a single Python script that uses WeappTestRunner to batch ALL operations, then execute it with ONE python call.

Each tool call costs ~30-60s overhead. A test with 10 individual CLI calls takes 5-15 minutes; the same 10 operations batched into one script take ~5 seconds.

Execution pattern

  1. Plan all operations the user needs
  2. Write a single Python script using WeappTestRunner
  3. Run with one python command
  4. Read output and report results

Example

import sys
sys.path.insert(0, r"path_to_weapp-automation_skill\scripts")
from weapp_automation import AutomationConfig, WeappTestRunner

config = AutomationConfig(
    project_path=r"path_to_your_miniapp\my_mini_app",
    ws_endpoint="ws://localhost:9420"
)

runner = WeappTestRunner(config)
results = (runner
    .navigate("pages/index/index")
    .wait(2)
    .screenshot("home.png")
    .click(".category-item")
    .wait(1)
    .screenshot("after_click.png")
    .get_results())

print(runner.get_summary())
for r in results:
    print(r)

Save as a .py file and run with python script.py.


Prerequisites

  1. Install: npm install -g miniprogram-automator
  2. Open WeChat DevTools -> Settings -> Security Settings -> Enable "Service Port"
  3. Ensure the project is imported into DevTools

CLI paths:

  • macOS: /Applications/wechatwebdevtools.app/Contents/MacOS/cli
  • Windows: C:\Program Files (x86)\Tencent\微信web开发者工具\cli.bat

WeappTestRunner Chainable Methods

MethodDescription
.navigate(page_path)Navigate to a page
.click(selector)Tap an element
.input(selector, text)Type text into an input field
.screenshot(filename)Take a screenshot
.scroll(selector, direction, distance)Scroll an element
.get_wxml(selector)Extract WXML DOM structure
.get_data(path)Read page data
.wait(seconds)Wait for a duration
.run()Execute all queued steps
.get_results()Execute and return results list
.get_summary()Return pass/fail summary dict

Other APIs

  • WeappAutomation - Single-step API for one-off operations
  • WeappLauncher - Launch/close WeChat DevTools
  • ConsoleReader - Read and analyze console logs
  • PerformanceMonitor - Collect performance metrics
  • TestScenarios - Pre-built test scenario templates (smoke, navigation, form, UI regression, user journey)

For detailed usage, parameters, and examples of all APIs, see references/api_reference.md.


Script Inventory

ScriptPurpose
scripts/weapp_launcher.pyLaunch/close WeChat DevTools
scripts/weapp_automation.pyCore automation engine (batch + single-step)
scripts/console_reader.pyConsole log reading and analysis
scripts/test_scenarios.pyPre-defined test scenario templates

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

OpenClaw

74.65%
按下载量换算1,297

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

来源信息

继续浏览同类 Skills