loading…
Search for a command to run...
loading…
Enables automated visual testing by comparing screenshots against baseline images using OpenAI to verify UI consistency. It generates detailed performance repor
Enables automated visual testing by comparing screenshots against baseline images using OpenAI to verify UI consistency. It generates detailed performance reports in both terminal and Excel formats based on provided user stories and acceptance criteria.
cd my-mcp-server
npm install
npm run build
Sau khi build thành công, file output sẽ ở: dist/index.js
Nhấn Ctrl + Shift + P → Gõ Preferences: Open User Settings (JSON)
Thêm đoạn sau vào file settings.json:
{
"mcp": {
"servers": {
"my-mcp": {
"type": "stdio",
"command": "node",
"args": ["d:\\my-mcp-server\\dist\\index.js"],
"env": {
"OPENAI_API_KEY": "sk-proj-your-api-key-here"
}
}
}
}
}
⚠️ Quan trọng: Thay
sk-proj-your-api-key-herebằng OpenAI API key thật của bạn.
Ctrl + Shift + PMCP: List Serversmy-mcp và click Restarttest-images/
├── expectation/
│ └── baseline.png # Ảnh baseline (design/expectation)
│
└── dealers/
├── dealer-a/
│ └── screenshot.png # Screenshot của dealer A
├── dealer-b/
│ └── screenshot.png # Screenshot của dealer B
├── dealer-c/
│ └── screenshot.png # Screenshot của dealer C
└── dealer-d/
└── screenshot.png # Screenshot của dealer D
Mở Copilot Chat trong VS Code (Ctrl + Shift + I)
Gõ prompt:
Compare dealer screenshots for "Highlights Widget" feature.
User story: Verify the highlights widget displays vehicle features correctly.
Expectation: d:\my-mcp-server\test-images\expectation\baseline.png
Dealers: d:\my-mcp-server\test-images\dealers
Compare dealer screenshots for "Login Page" feature.
User story: Verify login form has username, password input and submit button.
Expectation: d:\my-mcp-server\test-images\expectation\login-baseline.png
Dealers: d:\my-mcp-server\test-images\dealers
Export path: d:\reports\login-page-report.xlsx
# UI Structure Comparison Report
## Feature: Highlights Widget
**User Story:** Verify the highlights widget displays vehicle features correctly
**Baseline:** baseline.png
---
## Results
| Dealer | Image | Score | Status | Analysis |
|----------|----------------|----------|--------|------------------------------|
| dealer-a | screenshot.png | 95/100 | PASS | UI structure matches |
| dealer-b | screenshot.png | 92/100 | PASS | UI structure matches |
| dealer-c | screenshot.png | 45/100 | FAIL | Missing highlights widget |
| dealer-d | screenshot.png | 88/100 | PASS | UI structure matches |
---
## Summary
- **PASS:** 3
- **FAIL:** 1
- **Total:** 4
---
## Excel Report
**Exported to:** d:\my-mcp-server\test-images\report-Highlights-Widget-1705734567890.xlsx
| Sheet | Nội dung |
|---|---|
| Summary | Tổng quan: Feature, Total, Passed, Failed, Pass Rate |
| Results | Tất cả dealers với color-coded (xanh=PASS, đỏ=FAIL) |
| Failed Dealers | Chỉ những dealer failed để quick review |
Nguyên nhân: Chưa cấu hình API key
Giải pháp:
settings.json có OPENAI_API_KEY chưa$env:OPENAI_API_KEY = "sk-proj-your-key-here"
Nguyên nhân: Đường dẫn ảnh baseline sai
Giải pháp:
Nguyên nhân: Folder dealers trống hoặc không có subfolder
Giải pháp:
Nguyên nhân: MCP server chưa start hoặc cấu hình sai
Giải pháp:
Ctrl + Shift + P → MCP: List Serversmy-mcp có status Running khôngsettings.jsonNguyên nhân: Vượt rate limit của OpenAI
Giải pháp:
| Số dealers | Chi phí ước tính |
|---|---|
| 10 dealers | ~$0.10 - $0.30 |
| 50 dealers | ~$0.50 - $1.50 |
| 100 dealers | ~$1.00 - $3.00 |
Chi phí phụ thuộc vào kích thước ảnh và độ phức tạp.
| Parameter | Bắt buộc | Mô tả |
|---|---|---|
expectationImagePath |
✅ | Đường dẫn đến ảnh baseline |
dealersFolderPath |
✅ | Đường dẫn đến folder chứa các dealer subfolders |
featureName |
✅ | Tên feature đang test (VD: "Login Page") |
userStory |
✅ | Acceptance criteria cần verify |
openaiApiKey |
❌ | API key (nếu không set trong env) |
exportPath |
❌ | Đường dẫn export Excel (default: auto generate) |
Đặt tên folder dealer rõ ràng để dễ identify trong report
Screenshot cùng viewport size để so sánh chính xác hơn
User story càng cụ thể → AI analyze càng chính xác
❌ "Verify UI"
✅ "Verify the highlights widget shows vehicle features with icons and descriptions"
Chạy test trên ít dealers trước để verify tool hoạt động đúng
Nếu gặp vấn đề, kiểm tra:
Happy Testing! 🚀
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"ui-screenshot-comparison-mcp": {
"command": "npx",
"args": []
}
}
}Extract design specs and assets
An Open-Sourced UI to install and manage MCP servers for Windows, Linux and macOS.
Build, validate, and deploy multi-agent AI solutions on the ADAS platform. Design skills with tools, manage solution lifecycle, and connect from any AI environm
MCP Bundles: Create custom bundles of tools and connect providers with OAuth or API keys. Use one MCP server across thousands of integrations, with programmatic