feat: add web testing infrastructure
- Docker configurations for Playwright MCP (no host pollution) - Visual regression testing with pixelmatch - Link checking for 404/500 errors - Console error detection with Gitea issue creation - Form testing capabilities - /web-test and /web-test-fix commands - web-testing skill documentation - Reorganize project structure (docker/, scripts/, tests/) - Update orchestrator model to ollama-cloud/glm-5 Structure: - docker/ - Docker configurations (moved from archive) - scripts/ - Utility scripts - tests/ - Test suite with visual, console, links testing - .kilo/commands/ - /web-test and /web-test-fix commands - .kilo/skills/ - web-testing skill Issues: #58 #60 #62
This commit is contained in:
133
docker/docker-compose.web-testing.yml
Normal file
133
docker/docker-compose.web-testing.yml
Normal file
@@ -0,0 +1,133 @@
|
||||
version: '3.8'
|
||||
|
||||
# Web Testing Infrastructure for APAW
|
||||
# Covers: Visual Regression, Link Checking, Form Testing, Console Errors
|
||||
|
||||
services:
|
||||
# Main Playwright MCP Server - E2E Testing
|
||||
playwright-mcp:
|
||||
image: mcr.microsoft.com/playwright/mcp:latest
|
||||
container_name: playwright-mcp
|
||||
ports:
|
||||
- "8931:8931"
|
||||
volumes:
|
||||
- ./tests:/app/tests
|
||||
- ./tests/visual/baseline:/app/baseline
|
||||
- ./tests/visual/current:/app/current
|
||||
- ./tests/visual/diff:/app/diff
|
||||
- ./tests/reports:/app/reports
|
||||
environment:
|
||||
- PLAYWRIGHT_MCP_BROWSER=chromium
|
||||
- PLAYWRIGHT_MCP_HEADLESS=true
|
||||
- PLAYWRIGHT_MCP_NO_SANDBOX=true
|
||||
- PLAYWRIGHT_MCP_PORT=8931
|
||||
- PLAYWRIGHT_MCP_HOST=0.0.0.0
|
||||
command: >
|
||||
node cli.js
|
||||
--headless
|
||||
--browser chromium
|
||||
--no-sandbox
|
||||
--port 8931
|
||||
--host 0.0.0.0
|
||||
--caps=core,pdf
|
||||
restart: unless-stopped
|
||||
shm_size: '2gb'
|
||||
ipc: host
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8931/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
|
||||
# Visual Regression Service - Pixelmatch Comparison
|
||||
visual-regression:
|
||||
image: node:20-alpine
|
||||
container_name: visual-regression
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- ./tests/visual:/app
|
||||
- ./tests/reports:/app/reports
|
||||
environment:
|
||||
- PIXELMATCH_THRESHOLD=0.05
|
||||
command: >
|
||||
sh -c "npm install pixelmatch pngjs &&
|
||||
node /app/scripts/compare-screenshots.js"
|
||||
profiles:
|
||||
- visual
|
||||
depends_on:
|
||||
- playwright-mcp
|
||||
|
||||
# Console Error Aggregator
|
||||
console-monitor:
|
||||
image: node:20-alpine
|
||||
container_name: console-monitor
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- ./tests/console:/app
|
||||
- ./tests/reports:/app/reports
|
||||
command: >
|
||||
sh -c "npm install &&
|
||||
node /app/scripts/aggregate-errors.js"
|
||||
profiles:
|
||||
- console
|
||||
depends_on:
|
||||
- playwright-mcp
|
||||
|
||||
# Link Checker Service
|
||||
link-checker:
|
||||
image: node:20-alpine
|
||||
container_name: link-checker
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- ./tests/links:/app
|
||||
- ./tests/reports:/app/reports
|
||||
command: >
|
||||
sh -c "npm install playwright &&
|
||||
node /app/scripts/check-links.js"
|
||||
profiles:
|
||||
- links
|
||||
depends_on:
|
||||
- playwright-mcp
|
||||
|
||||
# Form Tester Service
|
||||
form-tester:
|
||||
image: node:20-alpine
|
||||
container_name: form-tester
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- ./tests/forms:/app
|
||||
- ./tests/reports:/app/reports
|
||||
command: >
|
||||
sh -c "npm install playwright &&
|
||||
node /app/scripts/test-forms.js"
|
||||
profiles:
|
||||
- forms
|
||||
depends_on:
|
||||
- playwright-mcp
|
||||
|
||||
# Full Test Suite - All Tests
|
||||
full-testing:
|
||||
image: node:20-alpine
|
||||
container_name: full-testing
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- ./tests:/app/tests
|
||||
- ./tests/reports:/app/reports
|
||||
command: >
|
||||
sh -c "npm install playwright pixelmatch pngjs &&
|
||||
node /app/tests/run-all-tests.js"
|
||||
profiles:
|
||||
- full
|
||||
depends_on:
|
||||
- playwright-mcp
|
||||
|
||||
# Networks
|
||||
networks:
|
||||
test-network:
|
||||
driver: bridge
|
||||
|
||||
# Volumes for test data persistence
|
||||
volumes:
|
||||
baseline-screenshots:
|
||||
test-results:
|
||||
Reference in New Issue
Block a user