OpenTester
OpenTester is a testing execution engine designed for AI coding tools (Claude Code, Cursor, OpenCode, etc.). It provides a unified DSL format and MCP interface, enabling Agents to generate, execute, and manage test cases, achieving an automated "code-test-fix" workflow.
README
OpenTester
MCP-First Testing Execution Infrastructure
OpenTester is a testing execution engine designed for AI coding tools (Claude Code, Cursor, OpenCode, etc.). It provides a unified DSL format and MCP interface, enabling Agents to generate, execute, and manage test cases, achieving an automated "code-test-fix" workflow.
<a href="https://glama.ai/mcp/servers/kznr02/open-tester"> <img width="380" height="200" src="https://glama.ai/mcp/servers/kznr02/open-tester/badge" alt="OpenTester MCP server" /> </a>
Core Positioning
┌─────────────────────────────────────────┐
│ AI Agent (Claude Code / Cursor / ...) │
│ ├─ Generate DSL test cases │
│ ├─ Decide testing strategies │
│ └─ Analyze failure reasons │
├─────────────────────────────────────────┤
│ OpenTester (MCP Server) │
│ ├─ Validate DSL syntax │
│ ├─ Execute tests (CLI/Web) │
│ ├─ Store cases/projects │
│ └─ Return structured results │
├─────────────────────────────────────────┤
│ Web UI (Auxiliary Observation Panel) │
│ ├─ View execution progress │
│ ├─ Debug cases (create/edit) │
│ └─ View history reports │
└─────────────────────────────────────────┘
Design Principles:
- Agent Intelligence: Test generation and failure analysis are handled by the Agent
- OpenTester Execution: Focuses on DSL validation and test execution
- MCP-First: All core features exposed through MCP
- Web UI Auxiliary: Visual monitoring and debugging, not required
Installation
Option 1: Install from PyPI (Recommended)
pip install opentester
# Or with uv
uv pip install opentester
Option 2: Install from Source
# Clone repository
git clone https://github.com/kznr02/OpenTester.git
cd OpenTester
# Install backend
uv pip install ./backend
# Install frontend dependencies (optional)
cd frontend
npm install
Option 3: Direct Run (Development)
cd backend
uv run opentester start
Quick Start
Start Services
# Start both FastAPI + MCP (foreground mode with prefixed logs)
opentester start
# Daemon mode (detached background with log files)
opentester start --daemon
# Start only API
opentester start --api
# Start only MCP
opentester start --mcp
# Custom ports
opentester start --api-port 8080 --mcp-port 8081
# Check status
opentester status
# Stop services
opentester stop
# Environment check
opentester doctor
Foreground Mode Log Output:
[API] INFO: Started server process [12345]
[API] INFO: Waiting for application startup.
[MCP] INFO: Started MCP server on port 8001
[API] INFO: Application startup complete.
Configure Claude Code (Streamable HTTP)
Add MCP configuration in .claude/settings.json:
{
"mcpServers": {
"opentester": {
"url": "http://localhost:8001/mcp"
}
}
}
Note: Current runtime transport is Streamable HTTP.
Usage Example
Conversation with Claude Code:
You: Help me test the login functionality
Claude: I'll create tests for the login feature...
[Generate DSL test case]
[Call MCP: validateDSL] ✓ Validation passed
[Call MCP: createProject] ✓ Project created
[Call MCP: saveCase] ✓ Case saved
[Call MCP: runCase]
Executing...
✓ All passed
Project Structure
OpenTester/
├── backend/ # FastAPI + Python
│ ├── opentester/
│ │ ├── api/ # REST API (for Web UI)
│ │ ├── core/ # Execution engine, storage
│ │ ├── models/ # Pydantic models (DSL, Project)
│ │ └── mcp/ # MCP Server (core)
│ └── pyproject.toml
├── frontend/ # React + TypeScript + Vite
│ └── src/ # Web UI (observation panel)
├── docs/
│ ├── SKILL_PROMPT.md # Agent Skill Prompt template
│ ├── DSL_SPEC.md # DSL syntax specification
│ └── MCP.md # MCP interface documentation
├── README.md # This document
└── LICENSE # MIT License
Core Features
1. DSL Validation
After Agent generates DSL, OpenTester validates syntax correctness:
version: "1.0"
meta:
name: "Login Test"
steps:
- action: exec
command: "curl http://localhost:3000/login"
- action: assert
assertion:
type: stdout_contains
expected: "token"
2. Test Execution
Supports execution targets:
- CLI: subprocess command execution (implemented)
- WEB: Playwright-based browser automation (implemented)
- GUI: experimental executor routing (disabled by default)
- TUI: experimental executor routing (disabled by default)
3. Web Testing MVP + AI DOM Analysis
- Web actions are executed by
WebExecutor(Playwright) - Browser console, page errors, and failed requests are normalized into
diagnostic_eventsfor each execution step - Supports AI-assisted locator flow via
ai_locatorin DSL steps - Execution can pause in
paused_waiting_for_aistatus and wait for AI selector submission - Supports DOM snapshot + optional screenshot capture for AI analysis
- Web UI and REST clients can retrieve persisted browser diagnostics from the execution diagnostics endpoints for post-run investigation
3. Project Management
- Projects stored in XDG data directory (
~/.local/share/opentester/on Linux,~/Library/Application Support/opentester/on macOS,%LOCALAPPDATA%\opentester\on Windows) - PRD content persisted with projects (provided by Agent)
- Test case version management
- Template library for reusable DSL patterns
4. Real-time Monitoring
- WebSocket real-time execution progress push
- Web UI visual display
- Execution history traceability
MCP Tools
| Tool | Description |
|---|---|
list_projects |
List all test projects |
get_project |
Get project details (including cases) |
create_project |
Create project |
delete_project |
Delete project |
validate_dsl |
Validate DSL syntax |
save_case |
Save test case |
delete_case |
Delete test case |
run_case |
Execute single case |
run_project |
Execute project cases |
stop_execution |
Stop execution |
get_execution_status |
Get execution status |
get_execution_log |
Get detailed logs |
request_dom_analysis |
Get DOM snapshot for paused AI step |
submit_ai_selector |
Submit selector to resume paused execution |
list_paused_executions |
List executions waiting for AI analysis |
list_templates |
List templates |
create_template |
Create DSL template |
instantiate_template |
Create case from template |
See MCP Interface Documentation for details.
Documentation
See documentation for detailed guides:
- Architecture - System architecture and design decisions
- MCP Interface - MCP tool specifications
- DSL Specification - YAML-based test definition language
- Development Guide - Development setup and contribution
Agents using OpenTester need to include DSL generation specifications. Refer to SKILL_PROMPT.md
DSL Specification
YAML-based test definition language. See DSL_SPEC.md for details.
Architecture
See ARCHITECTURE.md for system architecture, design principles, and architectural decisions.
Development Guide
Developers refer to DEVELOPMENT.md
Web UI
Auxiliary features:
- View project list and details
- Edit DSL cases (Monaco editor)
- Monitor execution progress
- View history reports
Note: Web UI is not the main entry point. All core features are provided through MCP.
Ports
- FastAPI (Web UI / REST API): http://localhost:8000
- MCP Server: http://localhost:8001/mcp
- API Docs: http://localhost:8000/docs
- Web UI Dev Server: http://localhost:5173
Data Storage
OpenTester follows the XDG Base Directory Specification:
- Projects:
<XDG_DATA_HOME>/opentester/projects/{project_id}.json- Linux:
~/.local/share/opentester/projects/ - macOS:
~/Library/Application Support/opentester/projects/ - Windows:
%LOCALAPPDATA%\opentester\projects\
- Linux:
- Executions:
<XDG_DATA_HOME>/opentester/executions/ - Templates:
<XDG_DATA_HOME>/opentester/templates/ - Logs:
<XDG_DATA_HOME>/opentester/logs/daemon/(daemon mode service logs) - Config:
~/.config/opentester/(or$XDG_CONFIG_HOME/opentester/)
Distribution
Refer to DISTRIBUTION.md for:
- PyPI publishing
- PyInstaller packaging
- Docker images
- System package managers
Quick build executable:
cd backend
pip install pyinstaller
pyinstaller opentester.spec
# Output: dist/opentester.exe (Windows) or dist/opentester (Linux/Mac)
Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
Documentation
License
OpenTester - MCP-First Testing Execution Platform
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。