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.
This commit is contained in:
50
tests/README.md
Normal file
50
tests/README.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# 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.
|
||||
Reference in New Issue
Block a user