An autonomous, green-portable HTML testing and Multi-LLM self-healing agent.
┌─────────────────┐ ┌─────────────────────────┐ ┌───────────────────────┐
│ Target HTML │ ───> │ Headless Playwright │ ───> │ Structured Diagnostic │
│ (input/*.html) │ │ • DOM/Console Errors │ │ • YAML Frontmatter │
└─────────────────┘ │ • Screenshot Artifacts │ │ • Failure Captures │
└─────────────────────────┘ └───────────────────────┘
│
┌─────────────────────────┐ ▼
│ Surgical Repaired HTML │ <─── Multi-LLM Fixer
│ (output/fixed/*.html) │ (Gemini / OpenAI)
└─────────────────────────┘
- Green-Portable & Zero Config: Drop onto any Windows, Linux, or macOS machine and run immediately. Auto-initializes isolated virtual environments and browser binaries.
- Headless Browser Execution: Uses Playwright to simulate real browsers, detecting JavaScript runtime exceptions, broken resource links, layout collisions, and unhandled promise rejections.
- Visual Proof Screenshots: Automatically captures high-resolution screenshots of defect points into
output/artifacts/. - Closed-Loop Self-Healing (
--mode fix): Feeds exact error tracebacks, DOM contexts, and screenshots to LLMs to perform minimal surgical code repairs, with automatic pre-fix backups.
- Copy this folder: Copy the entire
html-tester/folder anywhere on any machine. - Put target files: Put your
.htmlfiles or static project folders intoinput/. - Run:
- Windows: Double-click
run.bat(or runrun.batin CMD/PowerShell). - Linux / macOS: Execute
./run.sh.
- Windows: Double-click
- Inspect Results:
- AI-actionable Markdown reports are generated in
output/reports/. - Failure screenshots are in
output/artifacts/. - Repaired files (if auto-heal mode enabled) are exported to
output/fixed/.
- AI-actionable Markdown reports are generated in
html-tester/
├── input/ # Put target .html files here
├── output/ # Generated test reports and artifacts
│ ├── reports/ # Structured Markdown reports with YAML frontmatter
│ ├── artifacts/ # Visual proof screenshots (.png)
│ └── fixed/ # Successfully repaired HTML files
├── backup/ # Automated snapshots before surgical fixes
├── core/ # Engine components (server, scanner, runner, guard, llm, fixer)
├── config.yaml # Configuration (timeouts, budgets, model settings)
├── .env # Optional API keys for Multi-LLM auto-healing
├── requirements.txt # Dependencies
├── html_tester.py # Main CLI entry point
├── run.bat # Windows 1-click launcher with venv auto-initialization
└── run.sh # Linux/macOS launcher
# Pure diagnostic mode (default, test and report only)
python html_tester.py --mode test
# Closed-loop self-healing mode (test -> surgical fix -> verify -> export)
python html_tester.py --mode fix
# Test a specific file
python html_tester.py --target input/demo.html
# CI/CD strict mode (exits with code 1 if any target file has unresolved defects)
python html_tester.py --mode test --strict
# Run environment diagnostic check
python html_tester.py --diagnoseIf you run into any errors or crashes on another machine:
- Open the generated
html_tester.log(or copy the red traceback from the terminal). - Paste the plain text directly back into the AI assistant chat.
- The AI assistant will diagnose the root cause and provide the patched
.pyfiles immediately!
This repository includes a ready-to-use SKILL.md following the standard Agent Skills specification. You can mount or copy this skill into ~/.claude/skills/html-tester/, ~/.codex/skills/html-tester/, or ~/.gemini/config/skills/html-tester/ to let your coding agents autonomously verify and self-heal HTML artifacts.