AgentForWebUITest
告诉 Agent 测试哪个系统,Agent 自主完成全流程 Web UI 测试
[]
[
]
[
]
⚡ 5 秒安装
pip install agent-for-webui-test && webui-test check
🎯 一句话描述
AI 自主 Web UI 测试 Agent — 从页面探索、用例生成、执行判定到报告输出,全流程无人值守。
🧭 快速了解
| 🔍 自主探索 | 🧪 智能用例 | ⚡ ReAct执行 | 🏗️ TestSuite |
| BFS递归爬取页面 | 5类用例自动生成 | 自愈选择器 | 过滤+依赖编排 |
| API拦截+知识图谱 | P0-P3优先级 | 失败重试 | 8个预置模板 |
🏗️ 架构总览
用户指令 → Strategy → Explorer → Planner → SuiteRunner → 报告
│ │ │
KnowledgeGraph [TestCase] SuiteResult
│ │ │
┌──────┴──────────┴───────────┴──────┐
│ BrowserInterface │
│ AgentBrowser │ PlaywrightBrowser │
│ (Chrome 147) │ (Chromium|FF|WK) │
└─────────────────────────────────────┘
🚀 快速上手
# 1. 安装
pip install agent-for-webui-test
# 2. 自检
webui-test check
# 3. 冒烟测试
webui-test suite https://httpbin.org --preset smoke
# 4. CI 模式
webui-test suite https://example.com --ci --filter "P0+P1"
# Python API
from src.agent import WebUITestAgent
agent = WebUITestAgent()
result = agent.run_with_suite("测试 https://example.com", preset="smoke")
print(f"通过率: {result['suite_summary']['pass_rate']}%")
📊 项目状态
| 迭代 | 内容 | 状态 |
|---|---|---|
| 迭代1 | 自主探索 + 知识图谱 | ✅ |
| 迭代2 | 智能用例生成 (5类) | ✅ |
| 迭代3 | ReAct执行 + 自愈选择器 | ✅ |
| 迭代4 | 智能判定 + 根因分析 | ✅ |
| 迭代5 | TestSuite + CI集成 + 多浏览器 | ✅ |
| 模块 | 文件 | 行数 |
|---|---|---|
| 核心引擎 | 9 | ~4,800 |
| TestSuite | 6 | ~750 |
| 浏览器驱动 | 4 | ~750 |
| 工具 | 5 | ~1,500 |
| 测试 (9用例) | 6 | ~600 |
| 合计 | 29 | ~8,500 |
📚 文档
| 文档 | 说明 |
|---|---|
| 快速上手 | 5分钟从零到使用 |
| 安装指南 | pip + Docker 多路径 |
| 架构文档 | 架构详解 |
| 配置参考 | 完整参数说明 |
| 日志调试 | 日志与调试 |
| 发版清单 | 发布检查 |
🔧 CLI 命令
webui-test check # 环境自检
webui-test test <url> # 完整测试
webui-test explore <url> # 仅探索
webui-test suite <url> # TestSuite 编排
webui-test suite <url> --preset smoke # 冒烟测试
webui-test suite <url> --filter "P0+form" # 过滤执行
webui-test suite <url> --ci # CI模式
webui-test version # 版本信息
🧪 测试
pytest tests/ -v # 9 passed
make test # 等效
版本历史
| 版本 | 日期 | 变更 |
|---|---|---|
| v0.5.0 | 2026-05-07 | TestSuite + CI + 多浏览器 + 文档完善 |
| v0.4.0 | 2026-05-07 | 工程化: pip/CLI/CI/Makefile |
| v0.3.0 | 2026-04-28 | 迭代1-4: 探索/用例/执行/判定 |
| v0.2.0 | 2026-04-26 | 迭代1-2: 探索 + 用例生成 |
| v0.1.0 | 2026-04-26 | 项目初始化 |
Metadata
Release files for agent-for-webui-test 0.5.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agent_for_webui_test-0.5.2.tar.gz | 102.3 kB | Without provenance | Details for agent_for_webui_test-0.5.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agent_for_webui_test-0.5.2-py3-none-any.whl | Python 3 | none | any | Details for agent_for_webui_test-0.5.2-py3-none-any.whl |
Total release size: 199.7 kB
Release files / agent_for_webui_test-0.5.2.tar.gz
| Download URL | agent_for_webui_test-0.5.2.tar.gz |
|---|---|
| Size | 102.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
96c01a4806eabcd5fc2a3624d7ac56aa3d2f0911411ff03ddca3a6df1c35fdea
|
|
BLAKE2b-256 checksum How to use checksums |
e30b2579f385862611c72e987ba7e2f060b67dfec9370dd3a169d909fe2e4de6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / agent_for_webui_test-0.5.2-py3-none-any.whl
| Download URL | agent_for_webui_test-0.5.2-py3-none-any.whl |
|---|---|
| Size | 97.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5a50d7b4a97d21a87ae20780f35dd33da20bd3c87e064d2e8dd0be697c0bfafc
|
|
BLAKE2b-256 checksum How to use checksums |
f58038ec84c3057257ed5c2ad035726799790bc57f46e4e1d14c3e627898e2c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Security for agent-for-webui-test 0.5.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.