diff --git a/README.md b/README.md index 9ed7195..a85fb4e 100644 --- a/README.md +++ b/README.md @@ -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 -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