MCP Test Automation Framework
Automatically commits and pushes test run results to a GitHub repository.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Test Automation Frameworkrun the google search test and check in the results to GitHub"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π€ MCP Test Automation Framework
SQA Test Automation powered by Claude/Deepseek AI with self-healing locators and auto GitHub checkin
ποΈ Architecture
mcp-automation/
βββ src/
β βββ mcp/ # MCP Server (connects AI to browser)
β β βββ mcp-server.ts # MCP tool definitions & handlers
β β βββ index.ts
β βββ core/ # Core modules
β β βββ browser-manager.ts # Playwright browser lifecycle
β β βββ config.ts # Settings loader
β β βββ logger.ts # Logging utility
β βββ healing/ # Self-Healing Engine
β β βββ locator-healer.ts # Alternative locator strategies
β βββ scripts/ # Utility scripts
β β βββ git-auto-checkin.ts # Auto commit & push to GitHub
β βββ tests/ # Test definitions
β β βββ types.ts
β β βββ google-search.ts
β βββ mcp-server-entry.ts # MCP server entry point
β βββ runner.ts # Direct test runner
βββ config/
β βββ settings.json # Framework configuration
βββ logs/ # Run logs & screenshots
βββ .github/workflows/ # CI/CD pipeline
βββ package.json
βββ tsconfig.json
βββ README.mdRelated MCP server: BarrHawk
π How It Works
1. AI (Claude/Deepseek) calls MCP tool
β
βΌ
2. Playwright executes browser action
β
βΌ
3. Element not found?
β
βΌ
4. Self-Healing Engine kicks in
βββββββββββββββββββββββββββββββ
β Tries: role β text β β
β placeholder β label β testIdβ
β β CSS β XPath β aria-label β
βββββββββββββββββββββββββββββββ
β
βΌ
5. Found? β Logs healing action, proceeds
Not found? β Screenshot, reports failure
β
βΌ
6. GitHub Auto Checkin
βββββββββββββββββββββββββββββββ
β Creates branch β
β test-run/<name>-<timestamp> β
β Stages & commits all files β
β Pushes to remote β
βββββββββββββββββββββββββββββββπ Quick Start
1. Install dependencies
npm install
npx playwright install chromium2. Configure
Edit config/settings.json:
Set AI provider and API keys (via env vars)
Configure browser options
Set GitHub remote URL
3. Set API Keys (optional β for AI features)
set ANTHROPIC_API_KEY=sk-ant-... # For Claude
set DEEPSEEK_API_KEY=sk-... # For Deepseek4. Run tests directly
npm run dev5. Start MCP Server (for AI assistant connection)
npm run mcp-serverThen connect your AI assistant (Claude/Deepseek) to this MCP server.
π οΈ MCP Tools Available to AI
Tool | Description |
| Navigate to a URL |
| Click an element (with self-healing) |
| Type text into fields (with self-healing) |
| Get element text (with self-healing) |
| Wait for element to appear |
| Capture page screenshot |
| Press keyboard keys |
| Execute a full test case |
| Commit & push to GitHub |
| View self-healing stats |
π§ͺ Self-Healing
When a locator fails, the engine tries these strategies in order:
getByRoleβ Find by ARIA rolegetByTextβ Find by text contentgetByPlaceholderβ Find by placeholder attributegetByLabelβ Find by associated labelgetByTestIdβ Find bydata-testidCSS selector β Try original selector as CSS
CSS alternatives β e.g.,
textareaβinput, attribute variations[aria-label]β Find by aria-label attribute
All healing actions are logged to logs/healing-log.json.
π€ GitHub Auto Checkin
After each test run, the framework automatically:
Creates a new branch:
test-run/<test-name>-<timestamp>Stages all changed files (tests, logs, screenshots)
Commits with descriptive message
Pushes to remote
π§ Configuration
See config/settings.json for all options:
Section | Key | Description |
|
|
|
|
|
|
|
| Enable/disable self-healing |
|
| Max healing attempts per locator |
|
| Enable auto commit/push |
|
|
|
π License
MIT
Related MCP Connectors
AI QA that runs your app in a browser on every pull request: projects, test targets, test cases.
Browser-based QA for AI-built software. Test pages with real browsers via agents.
AI QA tester β real browsers scan sites for bugs, SEO, perf, and accessibility issues via chat.
Direct access to Cypress tests results and accessibility reports in your AI workflow.
Related MCP Servers
- AlicenseAqualityDmaintenanceGenerates intelligent Playwright locators with reliability rankings, creates Page Object Models, and runs test automation scripts directly from your IDE or AI assistant.56 npm1MIT
- FlicenseNot gradedqualityCmaintenanceEnables automated end-to-end testing and verification of web applications through natural language, with self-healing selectors and dual-mode execution.15-
- AlicenseBqualityCmaintenanceEnables AI agents to control a browser with self-healing locators that automatically recover when selectors change, allowing reliable web automation through natural language.7MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to create, run, autocorrect, and monitor Playwright tests for your app with a local dashboard, credential vault, and public status page.16MIT