Skip to main content

自主Web UI测试Agent — 告诉Agent测试哪个系统,Agent自主完成探索、用例生成、执行、判定

Project description

AgentForWebUITest

告诉 Agent 测试哪个系统,Agent 自主完成全流程 Web UI 测试

[Python] [Tests] [Version]


⚡ 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 项目初始化

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_for_webui_test-0.5.0.tar.gz (92.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agent_for_webui_test-0.5.0-py3-none-any.whl (84.4 kB view details)

Uploaded Python 3

File details

Details for the file agent_for_webui_test-0.5.0.tar.gz.

File metadata

  • Download URL: agent_for_webui_test-0.5.0.tar.gz
  • Upload date:
  • Size: 92.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for agent_for_webui_test-0.5.0.tar.gz
Algorithm Hash digest
SHA256 4acd89d6a96fb2bfaaa0ed36fee2e939cc3ee00a0284dcc6103f53935bbf7043
MD5 561f35c229b1551b566acd9cb2ff436b
BLAKE2b-256 a561a5b781a3dafa22021890da753996a3f18b3591df22d2921f7955b9a82166

See more details on using hashes here.

File details

Details for the file agent_for_webui_test-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agent_for_webui_test-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a7f9637bc4d051499dd8c005555a1694ffa3d3095262d75f853ffdc7d68c7cfc
MD5 eeb38a5ca813b5ba82b085ffeef14e96
BLAKE2b-256 3799b15603314f7a08158e9856f8bbd45bc4c3cacd9f3b5d341bec88c66685e3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page