Loading...
Loading...
[production-grade] Implements autonomous testing and self-healing workflow. After code generation, automatically runs tests (unit, integration, visual, E2E), detects bugs, attempts auto-fix, and continues development. Requires: Vitest, Playwright, Applitools, LLM access.
npx skill4agent add buiphucminhtam/forgewright autonomous-testingCode Generated → Run Tests → Detect Bug → Auto-Fix → Re-test → Continue
↓ ↑
Bug Classification Failed Fix
↓ ↓
Human Review ←←←←←←←←←←←←←┘| Layer | Tool | Speed | Auto-Fix |
|---|---|---|---|
| Unit | Vitest | 10ms | ✅ 90% |
| Integration | Vitest | 100ms | ✅ 60% |
| Visual | Playwright + Applitools | 1s | ⚠️ 40% |
| E2E | Playwright | 10s | ⚠️ 30% |
1. Syntax errors
2. Type errors (TypeScript)
3. Import/require path errors
4. Simple logic bugs (< 5 lines)
5. Test assertion typos
6. Missing null checks1. Complex logic bugs (> 5 lines)
2. API response changes
3. UI layout changes (verify intent)
4. Performance issues1. Architectural changes
2. Security vulnerabilities
3. Database migrations
4. Breaking API changes
5. Intent unclear# Run all tests
forge test
# Run specific layer
forge test unit
forge test integration
forge test visual
forge test e2e
# Auto-fix and retry
forge test:fix
# Autonomous mode (auto-fix + continue)
forge test:autonomous| Code | Meaning |
|---|---|
| 0 | All tests pass |
| 1 | Tests fail (auto-fix attempted) |
| 2 | Tests fail (human required) |
| 3 | Infrastructure error |
# .forgewright/autonomous.yaml
autonomous:
enabled: true
maxAutoFixAttempts: 3
requireHumanApproval: false
layers:
unit:
enabled: true
autoFix: true
timeout: 60s
integration:
enabled: true
autoFix: true
timeout: 120s
visual:
enabled: true
autoFix: false
timeout: 300s
e2e:
enabled: true
autoFix: false
timeout: 600s
llm:
provider: anthropic
model: claude-sonnet-4
temperature: 0.3docs/autonomous-testing/autonomous-workflow.md