opentester 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- opentester-0.1.0/.gitignore +54 -0
- opentester-0.1.0/.python-version +1 -0
- opentester-0.1.0/LICENSE +21 -0
- opentester-0.1.0/MANIFEST.in +3 -0
- opentester-0.1.0/PKG-INFO +171 -0
- opentester-0.1.0/README.md +130 -0
- opentester-0.1.0/opentester/__init__.py +6 -0
- opentester-0.1.0/opentester/__main__.py +5 -0
- opentester-0.1.0/opentester/api/__init__.py +0 -0
- opentester-0.1.0/opentester/api/cases.py +583 -0
- opentester-0.1.0/opentester/api/execution.py +473 -0
- opentester-0.1.0/opentester/api/parser.py +91 -0
- opentester-0.1.0/opentester/api/projects.py +151 -0
- opentester-0.1.0/opentester/api/templates.py +304 -0
- opentester-0.1.0/opentester/cli.py +401 -0
- opentester-0.1.0/opentester/core/__init__.py +0 -0
- opentester-0.1.0/opentester/core/config.py +48 -0
- opentester-0.1.0/opentester/core/execution_engine.py +372 -0
- opentester-0.1.0/opentester/core/executors/__init__.py +8 -0
- opentester-0.1.0/opentester/core/executors/base.py +386 -0
- opentester-0.1.0/opentester/core/executors/cli.py +341 -0
- opentester-0.1.0/opentester/core/storage.py +464 -0
- opentester-0.1.0/opentester/main.py +60 -0
- opentester-0.1.0/opentester/mcp/__init__.py +12 -0
- opentester-0.1.0/opentester/mcp/__main__.py +7 -0
- opentester-0.1.0/opentester/mcp/server.py +796 -0
- opentester-0.1.0/opentester/models/__init__.py +91 -0
- opentester-0.1.0/opentester/models/case.py +66 -0
- opentester-0.1.0/opentester/models/dsl.py +313 -0
- opentester-0.1.0/opentester/models/execution.py +112 -0
- opentester-0.1.0/opentester/models/project.py +87 -0
- opentester-0.1.0/opentester/models/template.py +105 -0
- opentester-0.1.0/opentester/services/__init__.py +0 -0
- opentester-0.1.0/opentester/start.py +68 -0
- opentester-0.1.0/package.json +5 -0
- opentester-0.1.0/pyproject.toml +61 -0
- opentester-0.1.0/requirements-cli.txt +2 -0
- opentester-0.1.0/tests/__init__.py +1 -0
- opentester-0.1.0/tests/test_control_flow.py +624 -0
- opentester-0.1.0/uv.lock +1141 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Dependencies
|
|
2
|
+
.venv/
|
|
3
|
+
venv/
|
|
4
|
+
env/
|
|
5
|
+
ENV/
|
|
6
|
+
node_modules/
|
|
7
|
+
|
|
8
|
+
# Python
|
|
9
|
+
**/__pycache__/
|
|
10
|
+
**/*.py[cod]
|
|
11
|
+
*$py.class
|
|
12
|
+
**/*.so
|
|
13
|
+
.Python
|
|
14
|
+
*.egg-info/
|
|
15
|
+
dist/
|
|
16
|
+
build/
|
|
17
|
+
*.egg
|
|
18
|
+
.pytest_cache/
|
|
19
|
+
.mypy_cache/
|
|
20
|
+
.ruff_cache/
|
|
21
|
+
|
|
22
|
+
# PyInstaller
|
|
23
|
+
*.spec
|
|
24
|
+
!backend/opentester.spec
|
|
25
|
+
**/build/
|
|
26
|
+
**/dist/
|
|
27
|
+
|
|
28
|
+
# Frontend
|
|
29
|
+
frontend/dist/
|
|
30
|
+
frontend/node_modules/
|
|
31
|
+
frontend/pnpm-lock.yaml
|
|
32
|
+
frontend/pnpm-workspace.yaml
|
|
33
|
+
|
|
34
|
+
# IDE
|
|
35
|
+
.vscode/
|
|
36
|
+
.idea/
|
|
37
|
+
*.swp
|
|
38
|
+
*.swo
|
|
39
|
+
*~
|
|
40
|
+
|
|
41
|
+
# Logs
|
|
42
|
+
.logs/
|
|
43
|
+
*.log
|
|
44
|
+
|
|
45
|
+
# OS
|
|
46
|
+
.DS_Store
|
|
47
|
+
Thumbs.db
|
|
48
|
+
|
|
49
|
+
# Claude Code
|
|
50
|
+
.claude/worktrees/
|
|
51
|
+
|
|
52
|
+
# Project specific
|
|
53
|
+
*.pid
|
|
54
|
+
claude-desktop-config.json
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13
|
opentester-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 OpenTester
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: opentester
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: AI-driven end-to-end testing platform with MCP-First architecture
|
|
5
|
+
Project-URL: Homepage, https://github.com/kznr02/OpenTester
|
|
6
|
+
Project-URL: Documentation, https://github.com/kznr02/OpenTester#readme
|
|
7
|
+
Project-URL: Repository, https://github.com/kznr02/OpenTester.git
|
|
8
|
+
Project-URL: Issues, https://github.com/kznr02/OpenTester/issues
|
|
9
|
+
Author: OpenTester Team
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: ai,automation,cli,gui,mcp,testing,tui
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Software Development :: Testing
|
|
19
|
+
Requires-Python: >=3.13
|
|
20
|
+
Requires-Dist: fastapi>=0.132.0
|
|
21
|
+
Requires-Dist: httpx>=0.28.1
|
|
22
|
+
Requires-Dist: mcp>=1.6.0
|
|
23
|
+
Requires-Dist: pexpect>=4.9.0
|
|
24
|
+
Requires-Dist: pillow>=12.1.1
|
|
25
|
+
Requires-Dist: pyautogui>=0.9.54
|
|
26
|
+
Requires-Dist: pydantic-settings>=2.13.1
|
|
27
|
+
Requires-Dist: pydantic>=2.12.5
|
|
28
|
+
Requires-Dist: python-dotenv>=1.2.1
|
|
29
|
+
Requires-Dist: python-multipart>=0.0.22
|
|
30
|
+
Requires-Dist: pyyaml>=6.0.3
|
|
31
|
+
Requires-Dist: rich>=13.0.0
|
|
32
|
+
Requires-Dist: typer>=0.15.0
|
|
33
|
+
Requires-Dist: uvicorn>=0.41.0
|
|
34
|
+
Requires-Dist: websockets>=16.0
|
|
35
|
+
Provides-Extra: dev
|
|
36
|
+
Requires-Dist: mypy>=1.19.1; extra == 'dev'
|
|
37
|
+
Requires-Dist: pytest-asyncio>=1.3.0; extra == 'dev'
|
|
38
|
+
Requires-Dist: pytest>=9.0.2; extra == 'dev'
|
|
39
|
+
Requires-Dist: ruff>=0.15.2; extra == 'dev'
|
|
40
|
+
Description-Content-Type: text/markdown
|
|
41
|
+
|
|
42
|
+
# OpenTester
|
|
43
|
+
|
|
44
|
+
**MCP-First 测试执行基础设施**
|
|
45
|
+
|
|
46
|
+
OpenTester 是专为 AI 编码工具(Claude Code、Cursor、OpenCode 等)设计的测试执行引擎。它提供统一的 DSL 格式和 MCP 接口,让 Agent 能够生成、执行和管理测试用例,实现"编码-测试-修复"的自动化闭环。
|
|
47
|
+
|
|
48
|
+
## 核心定位
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
┌─────────────────────────────────────────┐
|
|
52
|
+
│ AI Agent (Claude Code / Cursor / ...) │
|
|
53
|
+
│ ├─ 生成 DSL 测试用例 │
|
|
54
|
+
│ ├─ 决策测试策略 │
|
|
55
|
+
│ └─ 分析失败原因 │
|
|
56
|
+
├─────────────────────────────────────────┤
|
|
57
|
+
│ OpenTester (MCP Server) │
|
|
58
|
+
│ ├─ 验证 DSL 语法 │
|
|
59
|
+
│ ├─ 执行测试 (CLI/GUI/TUI) │
|
|
60
|
+
│ ├─ 存储用例/项目 │
|
|
61
|
+
│ └─ 返回结构化结果 │
|
|
62
|
+
├─────────────────────────────────────────┤
|
|
63
|
+
│ Web UI (辅助观察面板) │
|
|
64
|
+
│ ├─ 查看执行进度 │
|
|
65
|
+
│ ├─ 调试用例(创建/编辑) │
|
|
66
|
+
│ └─ 查看历史报告 │
|
|
67
|
+
└─────────────────────────────────────────┘
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## 安装
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
pip install opentester
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## 快速开始
|
|
77
|
+
|
|
78
|
+
### 启动服务
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# 一键启动 FastAPI + MCP(前台模式)
|
|
82
|
+
opentester start
|
|
83
|
+
|
|
84
|
+
# 后台运行
|
|
85
|
+
opentester start --daemon
|
|
86
|
+
|
|
87
|
+
# 只启动 API
|
|
88
|
+
opentester start --api
|
|
89
|
+
|
|
90
|
+
# 只启动 MCP
|
|
91
|
+
opentester start --mcp
|
|
92
|
+
|
|
93
|
+
# 查看状态
|
|
94
|
+
opentester status
|
|
95
|
+
|
|
96
|
+
# 停止服务
|
|
97
|
+
opentester stop
|
|
98
|
+
|
|
99
|
+
# 环境检查
|
|
100
|
+
opentester doctor
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### 配置 Claude Code
|
|
104
|
+
|
|
105
|
+
在 `.claude/settings.json` 中添加 MCP 配置:
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
{
|
|
109
|
+
"mcpServers": {
|
|
110
|
+
"opentester": {
|
|
111
|
+
"url": "http://localhost:8001/mcp"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### 配置 Claude Desktop (STDIO)
|
|
118
|
+
|
|
119
|
+
```json
|
|
120
|
+
{
|
|
121
|
+
"mcpServers": {
|
|
122
|
+
"opentester": {
|
|
123
|
+
"command": "opentester",
|
|
124
|
+
"args": ["start", "--mcp", "--stdio"]
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## 核心功能
|
|
131
|
+
|
|
132
|
+
- **DSL 验证**: YAML 格式的测试定义语言验证
|
|
133
|
+
- **测试执行**: 支持 CLI、GUI、TUI 多种执行目标
|
|
134
|
+
- **项目管理**: 项目存储于 `~/.opentester/projects/`
|
|
135
|
+
- **实时监控**: WebSocket 实时推送执行进度
|
|
136
|
+
|
|
137
|
+
## MCP 工具列表
|
|
138
|
+
|
|
139
|
+
| 工具 | 描述 |
|
|
140
|
+
|------|------|
|
|
141
|
+
| `listProjects` | 列出所有测试项目 |
|
|
142
|
+
| `getProject` | 获取项目详情 |
|
|
143
|
+
| `createProject` | 创建项目 |
|
|
144
|
+
| `deleteProject` | 删除项目 |
|
|
145
|
+
| `validateDSL` | 验证 DSL 语法 |
|
|
146
|
+
| `saveCase` | 保存用例 |
|
|
147
|
+
| `deleteCase` | 删除用例 |
|
|
148
|
+
| `runCase` | 执行单个用例 |
|
|
149
|
+
| `runProject` | 执行整个项目 |
|
|
150
|
+
| `stopExecution` | 停止执行 |
|
|
151
|
+
| `getExecutionStatus` | 获取执行状态 |
|
|
152
|
+
| `getExecutionLog` | 获取详细日志 |
|
|
153
|
+
| `listTemplates` | 列出模板 |
|
|
154
|
+
| `createTemplate` | 创建模板 |
|
|
155
|
+
| `instantiateTemplate` | 从模板创建用例 |
|
|
156
|
+
|
|
157
|
+
## 端口
|
|
158
|
+
|
|
159
|
+
- FastAPI: http://localhost:8000
|
|
160
|
+
- MCP Server: http://localhost:8001/mcp
|
|
161
|
+
- API Docs: http://localhost:8000/docs
|
|
162
|
+
|
|
163
|
+
## 数据存储
|
|
164
|
+
|
|
165
|
+
- 项目数据: `~/.opentester/projects/{project_id}.json`
|
|
166
|
+
- 执行日志: `~/.opentester/executions/`
|
|
167
|
+
- PID 文件: `~/.opentester/pids/`
|
|
168
|
+
|
|
169
|
+
## 开源协议
|
|
170
|
+
|
|
171
|
+
MIT License
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# OpenTester
|
|
2
|
+
|
|
3
|
+
**MCP-First 测试执行基础设施**
|
|
4
|
+
|
|
5
|
+
OpenTester 是专为 AI 编码工具(Claude Code、Cursor、OpenCode 等)设计的测试执行引擎。它提供统一的 DSL 格式和 MCP 接口,让 Agent 能够生成、执行和管理测试用例,实现"编码-测试-修复"的自动化闭环。
|
|
6
|
+
|
|
7
|
+
## 核心定位
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
┌─────────────────────────────────────────┐
|
|
11
|
+
│ AI Agent (Claude Code / Cursor / ...) │
|
|
12
|
+
│ ├─ 生成 DSL 测试用例 │
|
|
13
|
+
│ ├─ 决策测试策略 │
|
|
14
|
+
│ └─ 分析失败原因 │
|
|
15
|
+
├─────────────────────────────────────────┤
|
|
16
|
+
│ OpenTester (MCP Server) │
|
|
17
|
+
│ ├─ 验证 DSL 语法 │
|
|
18
|
+
│ ├─ 执行测试 (CLI/GUI/TUI) │
|
|
19
|
+
│ ├─ 存储用例/项目 │
|
|
20
|
+
│ └─ 返回结构化结果 │
|
|
21
|
+
├─────────────────────────────────────────┤
|
|
22
|
+
│ Web UI (辅助观察面板) │
|
|
23
|
+
│ ├─ 查看执行进度 │
|
|
24
|
+
│ ├─ 调试用例(创建/编辑) │
|
|
25
|
+
│ └─ 查看历史报告 │
|
|
26
|
+
└─────────────────────────────────────────┘
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## 安装
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pip install opentester
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## 快速开始
|
|
36
|
+
|
|
37
|
+
### 启动服务
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# 一键启动 FastAPI + MCP(前台模式)
|
|
41
|
+
opentester start
|
|
42
|
+
|
|
43
|
+
# 后台运行
|
|
44
|
+
opentester start --daemon
|
|
45
|
+
|
|
46
|
+
# 只启动 API
|
|
47
|
+
opentester start --api
|
|
48
|
+
|
|
49
|
+
# 只启动 MCP
|
|
50
|
+
opentester start --mcp
|
|
51
|
+
|
|
52
|
+
# 查看状态
|
|
53
|
+
opentester status
|
|
54
|
+
|
|
55
|
+
# 停止服务
|
|
56
|
+
opentester stop
|
|
57
|
+
|
|
58
|
+
# 环境检查
|
|
59
|
+
opentester doctor
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### 配置 Claude Code
|
|
63
|
+
|
|
64
|
+
在 `.claude/settings.json` 中添加 MCP 配置:
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"mcpServers": {
|
|
69
|
+
"opentester": {
|
|
70
|
+
"url": "http://localhost:8001/mcp"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### 配置 Claude Desktop (STDIO)
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
{
|
|
80
|
+
"mcpServers": {
|
|
81
|
+
"opentester": {
|
|
82
|
+
"command": "opentester",
|
|
83
|
+
"args": ["start", "--mcp", "--stdio"]
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## 核心功能
|
|
90
|
+
|
|
91
|
+
- **DSL 验证**: YAML 格式的测试定义语言验证
|
|
92
|
+
- **测试执行**: 支持 CLI、GUI、TUI 多种执行目标
|
|
93
|
+
- **项目管理**: 项目存储于 `~/.opentester/projects/`
|
|
94
|
+
- **实时监控**: WebSocket 实时推送执行进度
|
|
95
|
+
|
|
96
|
+
## MCP 工具列表
|
|
97
|
+
|
|
98
|
+
| 工具 | 描述 |
|
|
99
|
+
|------|------|
|
|
100
|
+
| `listProjects` | 列出所有测试项目 |
|
|
101
|
+
| `getProject` | 获取项目详情 |
|
|
102
|
+
| `createProject` | 创建项目 |
|
|
103
|
+
| `deleteProject` | 删除项目 |
|
|
104
|
+
| `validateDSL` | 验证 DSL 语法 |
|
|
105
|
+
| `saveCase` | 保存用例 |
|
|
106
|
+
| `deleteCase` | 删除用例 |
|
|
107
|
+
| `runCase` | 执行单个用例 |
|
|
108
|
+
| `runProject` | 执行整个项目 |
|
|
109
|
+
| `stopExecution` | 停止执行 |
|
|
110
|
+
| `getExecutionStatus` | 获取执行状态 |
|
|
111
|
+
| `getExecutionLog` | 获取详细日志 |
|
|
112
|
+
| `listTemplates` | 列出模板 |
|
|
113
|
+
| `createTemplate` | 创建模板 |
|
|
114
|
+
| `instantiateTemplate` | 从模板创建用例 |
|
|
115
|
+
|
|
116
|
+
## 端口
|
|
117
|
+
|
|
118
|
+
- FastAPI: http://localhost:8000
|
|
119
|
+
- MCP Server: http://localhost:8001/mcp
|
|
120
|
+
- API Docs: http://localhost:8000/docs
|
|
121
|
+
|
|
122
|
+
## 数据存储
|
|
123
|
+
|
|
124
|
+
- 项目数据: `~/.opentester/projects/{project_id}.json`
|
|
125
|
+
- 执行日志: `~/.opentester/executions/`
|
|
126
|
+
- PID 文件: `~/.opentester/pids/`
|
|
127
|
+
|
|
128
|
+
## 开源协议
|
|
129
|
+
|
|
130
|
+
MIT License
|
|
File without changes
|