CodeFRAME has comprehensive E2E test coverage with 47 tests (10 backend Pytest, 37 frontend Playwright) validating the complete autonomous workflow from discovery through completion.
cd tests/e2e
npx playwright test # Backend auto-starts on port 8080What happens automatically:
- Backend server starts with health check on port 8080
- Frontend dev server starts on port 3000
- Database seeding runs (via global-setup.ts)
- Tests execute across browsers (Chromium, Firefox, WebKit)
- Servers shut down after completion
uv run pytest tests/e2e/test_*.py -v -m "e2e"tests/e2e/playwright.config.ts:
webServer: [
{
command: 'cd ../.. && uv run uvicorn codeframe.ui.server:app --port 8080',
url: 'http://localhost:8080/health',
timeout: 120000,
reuseExistingServer: !process.env.CI
},
// Frontend server config...
]codeframe/ui/server.py:
@app.get("/health")
async def health_check():
return {"status": "ok"}# Check what's using port 8080
lsof -i:8080
# If it's a CodeFrame server you want to stop:
lsof -ti:8080 -c python | xargs kill
# Only use kill -9 as last resort (kills ALL processes on port)
# lsof -ti:8080 | xargs kill -9 # ⚠️ Use with caution
# Alternative: Let Playwright reuse the existing server
# (enabled by default via reuseExistingServer: true in playwright.config.ts)# Test backend manually (from project root)
uv run uvicorn codeframe.ui.server:app --port 8080
curl http://localhost:8080/health # Should return {"status": "ok"}# Remove test databases if needed (rarely necessary)
rm -f tests/e2e/fixtures/*/test_state.db
rm -f .codeframe/test_state.db
# Note: Database seeding uses INSERT OR REPLACE to avoid conflicts
# UNIQUE constraint warnings should NOT occur (if they do, report as bug)cd web-ui
npm install
npm run dev # Should start on port 3000- Use auto-start: Rely on Playwright's
webServerconfig (don't manually start backend) - Check health endpoint: Ensure
/healthresponds quickly (<100ms) - Clean databases: Remove test databases between test runs if needed
- Ignore UNIQUE warnings: Database seeding warnings are expected and harmless
- CI mode: In CI (
CI=true), servers are NOT auto-started (CI starts them separately) - Port conflicts: Kill processes on 8080/3000 before running tests locally
E2E tests validate:
- Full workflow: Discovery → Planning → Execution → Completion
- Quality gates blocking on failures
- Checkpoint creation and restoration
- Review agent security detection
- Cost tracking accuracy
- Real-time dashboard updates
- Multi-agent coordination
See tests/e2e/README.md for comprehensive testing documentation.