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.post2.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.post2-py3-none-any.whl (51.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: opentester-0.1.0.post2.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.post2.tar.gz
Algorithm Hash digest
SHA256 bcb51270ed6585f262b27be7780f50c6f803e5c38e25768df11d6d7170a57220
MD5 98f14ab2a5e7ce5da46904439e571035
BLAKE2b-256 731bdb5813a94af67891cbc5a40b9ec37af47e3a1ec2e032042eaa5266e5970c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opentester-0.1.0.post2-py3-none-any.whl
Algorithm Hash digest
SHA256 f9162f9da7f012cb3f003b0a05d8aff4fcd73e25e2c6cb779fc357e1e7db8bb1
MD5 82206ee59c0455a627ce3486c5356e0a
BLAKE2b-256 8f5d51475752015eeead2010cd3e746c891a64dcacf6213681bc2534882df236

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