简体中文 | English
Visual Replay Tester (VRT) is a next-generation End-to-End (E2E) desktop automation tool integrating Playwright, Electron, and the Model Context Protocol (MCP).
Our core philosophy is "Autonomous Driving for Testing". VRT goes beyond traditional record-and-playback tools; it is an intelligent system capable of autonomous exploration, planning, and generating permanent testing assets.
Core Value: "One-time AI Exploration, Permanent Script Assets." Transform expensive AI reasoning into low-cost, highly stable engineering scripts.
VRT is designed to achieve a "Given a URL, Return a Report" closed-loop automation workflow.
The system understands pages like a human engineer:
- Full-Screen VLM Scan: Uses Visual Language Models (VLM) to identify page types (e.g., Login, Dashboard) and core functional areas.
- Semantic Extraction: Understands the business meaning of UI components, not just the DOM structure.
- Strategy Generation: Automatically generates test paths (e.g., "Identify Login Box -> Plan Username/Password Input -> Click Login").
Powered by a Hybrid MCP + VLM Driver to ensure stability across all scenarios:
- MCP Highway (The Standard Path):
- Built on
@playwright/mcpand Chrome DevTools Protocol (CDP). - Uses Accessibility Tree and Ref IDs for precise control.
- Handles 80% of standard DOM interactions with high speed and stability.
- Built on
- Vision Off-road (The Fallback):
- Takes over when encountering Canvas, Shadow DOM, or heavily obfuscated code.
- Simulates human visual judgment and physical clicks.
Agent actions are never wasted. Every exploration step is compiled into a Standard Automation Script.
- Dynamic to Static: Converts dynamic AI decisions into fixed Playwright/VRT scripts.
- Visual Anchors: Automatically generates visual fingerprints for VLM-driven steps to enable future playback.
- Zero-Cost Regression: Generated scripts can be run by traditional CI/CD pipelines without consuming further AI tokens.
- Standard Protocol: Fully compatible with the Model Context Protocol.
- Natural Language Control: Tell the AI "Test the search function", and it will plan and execute the task.
- Precise Targeting: Say goodbye to fragile CSS selectors; use semantic targeting.
- WYSIWYG: Record and debug directly inside the Electron application.
- Visual Timeline: Drag-and-drop editor for test steps.
- Keyframe Snapshots: Automatically capture visual states at critical nodes for pixel-perfect regression testing.
- Node.js: v20+ (Required)
- OS: macOS / Windows / Linux
-
Clone the repository and install dependencies:
git clone [repository-url] cd Visual-Replay-Tester npm install nvm use 20 -
Install browser binaries:
npx playwright install chromium
-
Start the development server:
npm run dev
The app will launch and automatically start the local CDP server on port 9222.
Before using AI features, please configure your models:
- Click Settings in the navigation bar.
- Configure your Model Provider (OpenAI, Anthropic, Gemini, or Custom SiliconFlow/Together AI).
- Enter your API Key and enable the model.
- Assign the model to "MCP Automation" and "Visual AI" in the Feature Mapping section.
- Go to the MCP Automation tab.
- Enter the target URL.
- Type your task in the chat: "Test the login flow with username admin".
- Watch the Agent analyze the page, plan steps, and execute them.
- Click + New Recording.
- Interact with the page manually; the system generates steps automatically.
- Click Capture Keyframe at critical points.
- Save the script. Future runs will automatically compare new screenshots against the baseline.
graph TD
User[User] -->|URL/Command| Agent[AI Agent]
subgraph "VRT Engine"
Agent -->|Visual Perception| VLM[VLM Model]
Agent -->|Action Instructions| Hybrid[Hybrid Executor]
Hybrid -->|Standard Actions| MCP[MCP Client]
Hybrid -->|Complex Interactions| VIS[Visual Driver]
MCP -->|CDP/Accessibility| Browser[Internal Browser]
VIS -->|Coordinate Sim| Browser
end
Browser -->|Feedback/Screenshots| Agent
Hybrid -->|Compile| Script[Automation Script]
Script -->|CI/CD| Report[Test Report]
- Frontend: React + TypeScript + TailwindCSS
- Backend/Main: Electron + Node.js
- Protocol: Model Context Protocol (MCP)
- Build:
npm run build - Lint:
npm run lint
MIT