Files
AetherForge/tests/README.md
drjones e55f11a657 Add full test suite with unit, integration, and E2E smoke tests.
Introduce test.bat orchestrating Go/Vitest/Playwright phases, expand coverage across server, agent, and dashboard, and document in tests/README.md.
2026-05-29 10:04:52 -07:00

51 lines
1.2 KiB
Markdown

# AetherForge Test Suite
One command runs everything:
```bat
test.bat
```
Or with PowerShell directly:
```powershell
.\scripts\test-suite.ps1
```
## Phases
| Phase | What it runs | Location |
|-------|----------------|----------|
| 1 | Go server unit + integration tests | `server/` |
| 2 | Go agent tests | `agent/` |
| 3 | Fusion module compile check | `fusion/` |
| 4 | Frontend unit tests (Vitest) | `server/web/` |
| 5 | Frontend production build | `server/web/` |
| 6 | Server binary compile | `server/` |
| 7 | Agent binary compile | `agent/` |
| 8 | E2E smoke (Playwright) | `server/web/e2e/` — starts temp server |
## Run individual suites
```bat
cd server && go test ./...
cd agent && go test ./...
cd server\web && npm test
cd server\web && npm run test:e2e
```
## E2E only (server already running)
```bat
set AETHERFORGE_URL=http://127.0.0.1:8989
cd server\web && npm run test:e2e
```
## Adding tests
- **Go:** `*_test.go` next to the code under test
- **Frontend:** `src/**/*.test.ts` (Vitest)
- **E2E:** `server/web/e2e/*.spec.ts` (Playwright)
Coverage areas: forge/fusion, auth, DB, pool reconnect, API routes, fleet filters, preflight validation, media crypto roundtrip, dashboard login smoke.