AI-driven end-to-end testing platform with MCP-First architecture
Project description
OpenTester
MCP-First 测试执行基础设施
OpenTester 是专为 AI 编码工具(Claude Code、Cursor、OpenCode 等)设计的测试执行引擎。它提供统一的 DSL 格式和 MCP 接口,让 Agent 能够生成、执行和管理测试用例,实现"编码-测试-修复"的自动化闭环。
核心定位
┌─────────────────────────────────────────┐
│ AI Agent (Claude Code / Cursor / ...) │
│ ├─ 生成 DSL 测试用例 │
│ ├─ 决策测试策略 │
│ └─ 分析失败原因 │
├─────────────────────────────────────────┤
│ OpenTester (MCP Server) │
│ ├─ 验证 DSL 语法 │
│ ├─ 执行测试 (CLI/GUI/TUI) │
│ ├─ 存储用例/项目 │
│ └─ 返回结构化结果 │
├─────────────────────────────────────────┤
│ Web UI (辅助观察面板) │
│ ├─ 查看执行进度 │
│ ├─ 调试用例(创建/编辑) │
│ └─ 查看历史报告 │
└─────────────────────────────────────────┘
安装
pip install opentester
快速开始
启动服务
# 一键启动 FastAPI + MCP(前台模式)
opentester start
# 后台运行
opentester start --daemon
# 只启动 API
opentester start --api
# 只启动 MCP
opentester start --mcp
# 查看状态
opentester status
# 停止服务
opentester stop
# 环境检查
opentester doctor
配置 Claude Code
在 .claude/settings.json 中添加 MCP 配置:
{
"mcpServers": {
"opentester": {
"url": "http://localhost:8001/mcp"
}
}
}
核心功能
- DSL 验证: YAML 格式的测试定义语言验证
- 测试执行: 当前实现 CLI、WEB(GUI/TUI 为实验性阶段能力)
- 项目管理: 项目存储于 XDG 数据目录(Windows 为
%LOCALAPPDATA%\\opentester\\) - 实时监控: WebSocket 实时推送执行进度
MCP 工具列表
| 工具 | 描述 |
|---|---|
list_projects |
列出所有测试项目 |
get_project |
获取项目详情 |
create_project |
创建项目 |
delete_project |
删除项目 |
validate_dsl |
验证 DSL 语法 |
save_case |
保存用例 |
delete_case |
删除用例 |
run_case |
执行单个用例 |
run_project |
执行整个项目 |
stop_execution |
停止执行 |
get_execution_status |
获取执行状态 |
get_execution_log |
获取详细日志 |
list_templates |
列出模板 |
create_template |
创建模板 |
instantiate_template |
从模板创建用例 |
端口
- FastAPI: http://localhost:8000
- MCP Server: http://localhost:8001/mcp
- API Docs: http://localhost:8000/docs
数据存储
- 项目数据:
~/.opentester/projects/{project_id}.json - 执行日志:
~/.opentester/executions/ - PID 文件:
~/.opentester/pids/
开源协议
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
opentester-0.2.0.tar.gz
(144.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file opentester-0.2.0.tar.gz.
File metadata
- Download URL: opentester-0.2.0.tar.gz
- Upload date:
- Size: 144.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0bfe88dac31a578f24282c4fbad46e940cc9637d5d387912f677d3d04c915354
|
|
| MD5 |
9510d741bb68d4ffc90a9567dcfd2363
|
|
| BLAKE2b-256 |
433fd05b232f731e6e41e2812503d641ac80744607cd5d82e0fa43c70b411982
|
File details
Details for the file opentester-0.2.0-py3-none-any.whl.
File metadata
- Download URL: opentester-0.2.0-py3-none-any.whl
- Upload date:
- Size: 90.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
942ed48f935657d98b2551b75430fd2886aa12ad73c8fd045916b04227c621d8
|
|
| MD5 |
cbcfec968f4ef1b4209e5c0c7c8c862e
|
|
| BLAKE2b-256 |
28320ea1839e60c64cd654e6fa7531abf91d0cb9574753f4992d49b4bcfc3e21
|