loading…
Search for a command to run...
loading…
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,
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.
MCP-First Testing Execution Infrastructure
PyPI version License: MIT kznr02/OpenTester MCP server
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.
┌─────────────────────────────────────────┐
│ 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:
pip install opentester
# Or with uv
uv pip install opentester
# 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
cd backend
uv run opentester start
# 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.
Add MCP configuration in .claude/settings.json:
{
"mcpServers": {
"opentester": {
"url": "http://localhost:8001/mcp"
}
}
}
Note: Current runtime transport is Streamable HTTP.
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
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
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"
Supports execution targets:
WebExecutor (Playwright)diagnostic_events for each execution stepai_locator in DSL stepspaused_waiting_for_ai status and wait for AI selector submission~/.local/share/opentester/ on Linux, ~/Library/Application Support/opentester/ on macOS, %LOCALAPPDATA%\opentester\ on Windows)| 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.
See documentation for detailed guides:
Agents using OpenTester need to include DSL generation specifications. Refer to SKILL_PROMPT.md
YAML-based test definition language. See DSL_SPEC.md for details.
See ARCHITECTURE.md for system architecture, design principles, and architectural decisions.
Developers refer to DEVELOPMENT.md
Auxiliary features:
Note: Web UI is not the main entry point. All core features are provided through MCP.
OpenTester follows the XDG Base Directory Specification:
<XDG_DATA_HOME>/opentester/projects/{project_id}.json~/.local/share/opentester/projects/~/Library/Application Support/opentester/projects/%LOCALAPPDATA%\opentester\projects\<XDG_DATA_HOME>/opentester/executions/<XDG_DATA_HOME>/opentester/templates/<XDG_DATA_HOME>/opentester/logs/daemon/ (daemon mode service logs)~/.config/opentester/ (or $XDG_CONFIG_HOME/opentester/)Refer to DISTRIBUTION.md for:
Quick build executable:
cd backend
pip install pyinstaller
pyinstaller opentester.spec
# Output: dist/opentester.exe (Windows) or dist/opentester (Linux/Mac)
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
OpenTester - MCP-First Testing Execution Platform
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"opentester": {
"command": "npx",
"args": []
}
}
}