docs(readme): add test coverage summary and commands

Add comprehensive testing documentation to README:
- Test commands for backend (dotnet test)
- Test commands for E2E (playwright)
- Test coverage summary table
- Auth handler tests breakdown

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Andrés Eduardo García Márquez 2026-01-09 07:45:07 -05:00
parent 73174acd73
commit 34fbe9886e
1 changed files with 43 additions and 2 deletions

View File

@ -204,8 +204,13 @@ dotnet build
dotnet run --project Host
dotnet watch run --project Host # Hot reload
# Tests
dotnet test
# Tests - Todos
dotnet test tests/Application.Tests
dotnet test tests/Domain.Tests
dotnet test tests/Integration.Tests
# Tests - Solo Auth
dotnet test tests/Application.Tests --filter "FullyQualifiedName~Auth"
# Migraciones EF Core
dotnet ef migrations add <Nombre> -p Adapters/Driven/Persistence -s Host
@ -222,8 +227,44 @@ npx ng serve # Desarrollo
npx ng build --configuration prod # Producción
npx ng test # Tests unitarios
npx ng lint # Linting
# E2E Tests
npx playwright test # Todos
npx playwright test auth.spec.ts # Solo auth
npx playwright test --reporter=html # Con reporte HTML
```
## Tests Automatizados
### Resumen
| Tipo | Cantidad | Estado |
|------|----------|--------|
| Application Tests | 98 | ✅ 100% |
| Domain Tests | 30 | ✅ 100% |
| Integration Tests | 5 | ✅ 100% |
| E2E Tests | 97 | ⚠️ 26% |
| **Total** | **230** | |
### Tests de Auth (Backend)
| Handler | Tests | Cobertura |
|---------|-------|-----------|
| LoginCommand | 6 | Credenciales válidas/inválidas |
| RegisterCommand | 8 | Registro, duplicados, validaciones |
| ResetPasswordCommand | 8 | Reset válido/inválido |
| ActivateAccountCommand | 10 | Activación, expiración, JWT |
### Tests E2E (Playwright)
| Categoría | Tests | Descripción |
|-----------|-------|-------------|
| Autenticación | 15 | Login, registro, reset |
| Control de Acceso | 16 | Roles Admin/Student |
| Reglas de Negocio | 16 | Max 3 materias, mismo profesor |
| Activación | 18 | Flujo completo de activación |
| CRUD | 32 | Estudiantes, inscripciones, compañeros |
### Docker
```bash