|
1 | 1 | # WebQA Agent |
2 | 2 |
|
3 | | -**WebQA Agent** 是全自动网页评估测试 Agent,一键诊断性能、安全、功能与交互体验 |
| 3 | +[English](README.md) · [简体中文](README_zh-CN.md) |
4 | 4 |
|
5 | | -## 🚀 核心特性 |
| 5 | +**WebQA Agent** is an autonomous web agent that audits performance, functionality, and UX for any web product. |
6 | 6 |
|
7 | | -### 🧭 功能介绍 |
| 7 | +## 🚀 Core Features |
| 8 | + |
| 9 | +### 🧭 Overview |
8 | 10 |
|
9 | 11 | <p> |
10 | | - <img src="docs/images/webqa.svg" alt="WebQA Agent 业务功能图" /> |
| 12 | + <img src="docs/images/webqa.svg" alt="WebQA Agent Business Features Diagram" /> |
11 | 13 | </p> |
12 | 14 |
|
13 | | -### 📋 特性概览 |
| 15 | +### 📋 Feature Highlights |
14 | 16 |
|
15 | | -- **🤖 AI智能测试**:WebQA-Agent能够自主进行网站测试,从页面抓取、用例生成与执行,实现端到端功能测试自动化 |
16 | | -- **📊 多维度评估**:覆盖功能、性能、用户体验、安全等核心测试场景,评估页面加载速度、设计细节和链接,全面保障系统质量 |
17 | | -- **🎯 精准诊断**:基于真实浏览器环境的深度测试,提供可操作的优化建议 |
18 | | -- **📈 可视化报告**:生成详细的HTML测试报告,多维度、可视化展示测试结果,便于分析与追踪 |
| 17 | +- **🤖 AI-Powered Testing**: WebQA Agent autonomously conducts website testing, from page crawling and test case generation to execution, achieving end-to-end functional test automation. |
| 18 | +- **📊 Multi-Dimensional Test**: Covers core testing scenarios, including functionality, performance, user experience, and security, evaluating page load speed, design details, and links for comprehensive system quality assurance. |
| 19 | +- **🎯 Precise Diagnostics**: Performs deep testing in real browser environments and provides actionable optimization recommendations. |
| 20 | +- **📈 Visual Reports**: Generates detailed HTML test reports with a multi-dimensional visual presentation of results for easy analysis and tracking. |
19 | 21 |
|
20 | | -## 📌 测试案例 |
| 22 | +## 📌 Test Cases |
21 | 23 |
|
22 | 24 | <p align="center"> |
23 | | - <img src="https://github.com/user-attachments/assets/b75f18bf-8b92-498e-b5e1-7c4dc5cd33f5" alt="AI 功能测试" width="45%"/> |
| 25 | + <img src="https://github.com/user-attachments/assets/b75f18bf-8b92-498e-b5e1-7c4dc5cd33f5" alt="AI Functional Testing" width="45%"/> |
24 | 26 | |
25 | | - <img src="https://github.com/user-attachments/assets/560cd99d-1213-47b9-82dc-52d3f2d1c1e7" alt="其他测试" width="45%"/> |
| 27 | + <img src="https://github.com/user-attachments/assets/560cd99d-1213-47b9-82dc-52d3f2d1c1e7" alt="Other Tests" width="45%"/> |
26 | 28 | </p> |
27 | 29 |
|
28 | 30 | <p align="center"> |
29 | | - <b>左:AI 智能测试 全自动执行流程</b> | <b>右:覆盖多类测试场景</b> |
| 31 | + <b>Left: AI Functional Testing</b> | <b>Right: Multiple Test Scenarios Coverage</b> |
30 | 32 | </p> |
31 | 33 |
|
32 | | -## 安装与配置 |
| 34 | +## Installation & Configuration |
33 | 35 |
|
34 | | -### 🚀 Docker一键启动 |
| 36 | +### 🚀 One-Click Docker Setup |
35 | 37 |
|
36 | | -在开始之前,请确保已安装 Docker。如未安装,请参考官方安装指南:[Docker 安装指南](https://docs.docker.com/get-started/get-docker/)。 |
| 38 | +Before starting, ensure Docker is installed. If not, please refer to the official installation guide: [Docker Installation Guide](https://docs.docker.com/get-started/get-docker/). |
37 | 39 |
|
38 | 40 | ```bash |
39 | | -# 1. 下载配置文件模板 |
| 41 | +# 1. Download configuration template |
40 | 42 | mkdir -p config && curl -fsSL https://raw.githubusercontent.com/MigoXLab/webqa-agent/main/config/config.yaml.example -o config/config.yaml |
41 | 43 |
|
42 | | -# 2. 编辑配置文件 |
43 | | -# 设置 target.url、llm_config.api_key 等参数 |
| 44 | +# 2. Edit configuration file |
| 45 | +# Set target.url, llm_config.api_key and other parameters |
44 | 46 |
|
45 | | -# 3. 一键启动 |
| 47 | +# 3. One-click start |
46 | 48 | curl -fsSL https://raw.githubusercontent.com/MigoXLab/webqa-agent/main/start.sh | bash |
47 | 49 | ``` |
48 | 50 |
|
49 | | -### 源码安装 |
| 51 | +### Source Installation |
50 | 52 |
|
51 | 53 | ```bash |
52 | 54 | git clone https://github.com/MigoXLab/webqa-agent.git |
53 | 55 | cd webqa-agent |
54 | 56 | ``` |
55 | 57 |
|
56 | | -安装 Python >= 3.10,运行以下命令: |
| 58 | +Install Python >= 3.10 and run the following commands: |
57 | 59 |
|
58 | 60 | ```bash |
59 | 61 | pip install -r requirements.txt |
60 | 62 | playwright install |
61 | | - |
62 | 63 | ``` |
63 | 64 |
|
64 | | -性能测试 - Lighthouse 安装(可选) |
| 65 | +Performance Testing - Lighthouse Installation (Optional) |
65 | 66 |
|
66 | 67 | ```bash |
67 | | -# 需要 Node.js >= 18.0.0 package.json |
| 68 | +# Requires Node.js >= 18.0.0 |
68 | 69 | npm install |
69 | | - |
70 | 70 | ``` |
71 | 71 |
|
72 | | -安全测试 - Nuclei 安装(可选) |
| 72 | +Security Testing - Nuclei Installation (Optional) |
73 | 73 |
|
74 | | -下载地址: [Nuclei Releases](https://github.com/projectdiscovery/nuclei/releases/) |
| 74 | +Download from: [Nuclei Releases](https://github.com/projectdiscovery/nuclei/releases/) |
75 | 75 |
|
76 | 76 | ```bash |
77 | 77 | # MacOS |
78 | 78 | brew install nuclei |
79 | 79 |
|
80 | | -# 其他系统请从上述下载地址获取对应架构的版本 |
81 | | - |
82 | | -# 安装后更新模板并验证 |
83 | | -nuclei -ut -v # 更新 Nuclei 模板 |
84 | | -nuclei -version # 验证安装成功 |
| 80 | +# For other systems, download the appropriate version from the link above |
85 | 81 |
|
| 82 | +# Update templates and verify installation |
| 83 | +nuclei -ut -v # Update Nuclei templates |
| 84 | +nuclei -version # Verify successful installation |
86 | 85 | ``` |
87 | 86 |
|
88 | | -参考“使用说明 > 测试配置”进行 `config/config.yaml` 配置后,运行下方命令。 |
| 87 | +After configuring `config/config.yaml` (refer to "Usage > Test Configuration"), run: |
89 | 88 |
|
90 | 89 | ```bash |
91 | 90 | python webqa-agent.py |
92 | 91 | ``` |
93 | 92 |
|
94 | | -## 使用说明 |
| 93 | +## Usage |
95 | 94 |
|
96 | | -### 测试配置 |
| 95 | +### Test Configuration |
97 | 96 |
|
98 | | -`webqa-agent` 通过 YAML 配置测试运行参数: |
| 97 | +`webqa-agent` uses YAML configuration for test parameters: |
99 | 98 |
|
100 | 99 | ```yaml |
101 | 100 | target: |
102 | | - url: https://example.com/ # 需要测试的网站URL |
| 101 | + url: https://example.com/ # Website URL to test |
103 | 102 | description: example description |
104 | 103 |
|
105 | | -test_config: # 测试项配置 |
106 | | - function_test: # 功能测试 |
| 104 | +test_config: # Test configuration |
| 105 | + function_test: # Functional testing |
107 | 106 | enabled: True |
108 | 107 | type: ai # default or ai |
109 | | - business_objectives: example business objectives # 建议加入测试范围,如:测试搜索功能 |
110 | | - ux_test: # 用户体验测试 |
| 108 | + business_objectives: example business objectives # Recommended to include test scope, e.g., test search functionality |
| 109 | + ux_test: # User experience testing |
111 | 110 | enabled: True |
112 | | - performance_test: # 性能测试 |
| 111 | + performance_test: # Performance testing |
113 | 112 | enabled: False |
114 | | - security_test: # 安全测试 |
| 113 | + security_test: # Security testing |
115 | 114 | enabled: False |
116 | 115 |
|
117 | | -llm_config: # 视觉模型配置,当前仅支持 OpenAI SDK 兼容格式 |
118 | | - model: gpt-4.1 # 推荐使用 |
| 116 | +llm_config: # Vision model configuration, currently supports OpenAI SDK compatible format only |
| 117 | + model: gpt-4.1 # Recommended |
119 | 118 | api_key: your_api_key |
120 | 119 | base_url: https://api.example.com/v1 |
121 | 120 |
|
122 | 121 | browser_config: |
123 | 122 | viewport: {"width": 1280, "height": 720} |
124 | | - headless: False # Docker环境会自动覆盖为True |
| 123 | + headless: False # Automatically overridden to True in Docker environment |
125 | 124 | language: zh-CN |
126 | 125 | cookies: [] |
127 | | - |
128 | 126 | ``` |
129 | 127 |
|
130 | | -在配置和运行测试时,请注意以下重要事项: |
| 128 | +Please note the following important considerations when configuring and running tests: |
131 | 129 |
|
132 | | -#### 1. 功能测试说明 |
| 130 | +#### 1. Functional Testing Notes |
133 | 131 |
|
134 | | -- **AI模式**:当在配置文件中指定生成测试用例的数量时,系统可能会根据实际测试情况进行代理重新规划和调整。这可能导致最终执行的测试用例数量与初始设定存在一定出入,以确保测试的准确性和有效性。 |
| 132 | +- **AI Mode**: When specifying the number of test cases to generate in the configuration file, the system may re-plan based on based on actual testing conditions. This may result in the final number of executed test cases differing from the initial configuration to ensure testing accuracy and effectiveness. |
135 | 133 |
|
136 | | -- **Default模式**:功能测试的 `default` 模式主要验证UI元素的点击行为是否成功执行,包括按钮点击、链接跳转等基本交互功能。 |
| 134 | +- **Default Mode**: The `default` mode of functional testing primarily verifies whether UI element clicks execute successfully, including basic interactive functions like button clicks and link navigation. |
137 | 135 |
|
138 | | -#### 2. 用户体验测试说明 |
| 136 | +#### 2. User Experience Testing Notes |
139 | 137 |
|
140 | | -UX(用户体验)测试专注于评估网站的交互设计、可用性和用户友好程度。测试结果中包含的模型输出内容是基于用户体验最佳实践提供的改进建议,供开发和设计团队参考优化。 |
| 138 | +UX (User Experience) testing focuses on evaluating website interaction design, usability, and user-friendliness. The model output in the test results provides suggestions for improvement suggestions based on user experience best practices to guide development and design teams in optimization. |
141 | 139 |
|
142 | | -## 查看结果 |
| 140 | +## View Results |
143 | 141 |
|
144 | | -在 `reports` 目录会生成本次测试的文件夹,打开其中的 HTML 报告即可查看结果。 |
| 142 | +Test results will be generated in the `reports` directory. Open the HTML report within the generated folder to view results. |
145 | 143 |
|
146 | | -## RoadMap |
| 144 | +## Roadmap |
147 | 145 |
|
148 | | -1. AI功能测试持续优化:提升覆盖率与准确性 |
149 | | -2. 功能遍历与页面校验:校验业务逻辑正确性与数据完整性 |
150 | | -3. 交互与可视化:用例可视化与本地服务实时展示推理过程 |
151 | | -4. 能力扩展:多模型接入与更多评估维度集成 |
| 146 | +1. Continuous optimization of AI functional testing: Improve coverage and accuracy |
| 147 | +2. Functional traversal and page validation: Verify business logic correctness and data integrity |
| 148 | +3. Interaction and visualization: Test case visualization and local service real-time reasoning process display |
| 149 | +4. Capability expansion: Multi-model integration and more evaluation dimensions |
152 | 150 |
|
153 | | -## 开源许可证 |
| 151 | +## Open Source License |
154 | 152 |
|
155 | | -该项目采用 [Apache 2.0 开源许可证](LICENSE)。 |
| 153 | +This project is licensed under the [Apache 2.0 License](LICENSE). |
0 commit comments