Skip to main content

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"
    }
  }
}

配置 Claude Desktop (STDIO)

{
  "mcpServers": {
    "opentester": {
      "command": "opentester",
      "args": ["start", "--mcp", "--stdio"]
    }
  }
}

核心功能

  • DSL 验证: YAML 格式的测试定义语言验证
  • 测试执行: 支持 CLI、GUI、TUI 多种执行目标
  • 项目管理: 项目存储于 ~/.opentester/projects/
  • 实时监控: WebSocket 实时推送执行进度

MCP 工具列表

工具 描述
listProjects 列出所有测试项目
getProject 获取项目详情
createProject 创建项目
deleteProject 删除项目
validateDSL 验证 DSL 语法
saveCase 保存用例
deleteCase 删除用例
runCase 执行单个用例
runProject 执行整个项目
stopExecution 停止执行
getExecutionStatus 获取执行状态
getExecutionLog 获取详细日志
listTemplates 列出模板
createTemplate 创建模板
instantiateTemplate 从模板创建用例

端口

数据存储

  • 项目数据: ~/.opentester/projects/{project_id}.json
  • 执行日志: ~/.opentester/executions/
  • PID 文件: ~/.opentester/pids/

开源协议

MIT License

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

opentester-0.1.0.post3.tar.gz (97.3 kB view details)

Uploaded Source

Built Distribution

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

opentester-0.1.0.post3-py3-none-any.whl (50.9 kB view details)

Uploaded Python 3

File details

Details for the file opentester-0.1.0.post3.tar.gz.

File metadata

  • Download URL: opentester-0.1.0.post3.tar.gz
  • Upload date:
  • Size: 97.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for opentester-0.1.0.post3.tar.gz
Algorithm Hash digest
SHA256 11cb4c122e50ac6190cb96737619e0c11f5d835239e47ed8088f11abd901b416
MD5 b4f07d154bcfd035de5985e7b1fe77d1
BLAKE2b-256 b516e4a870b2877e97f760fabfadd35b78955b399f16348f3cc14d0c8e7184e9

See more details on using hashes here.

File details

Details for the file opentester-0.1.0.post3-py3-none-any.whl.

File metadata

File hashes

Hashes for opentester-0.1.0.post3-py3-none-any.whl
Algorithm Hash digest
SHA256 5fa65ac3fb5c0f559f44fdd385243a963809a6b930b4b5171ffb08c0dbbf9200
MD5 5c8e7efb2d2a437c33d4008b00ed2515
BLAKE2b-256 a535368d6285ef4f16165b513d39449af438973ea1e20942740a46dab0d1427c

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