Herramientas
| Herramienta | Licencia | Proyecto | Proposito |
|---|---|---|---|
| Playwright | Apache 2.0 | nvito-admin, nvito-invitations | E2E web multi-browser |
| Maestro | Apache 2.0 | nvito-client | E2E mobile nativo |
| k6 | AGPL-3.0 | nvito-api | Load/performance testing |
| Vitest | MIT | nvito-pwa | Unit testing |
| Allure Report | Apache 2.0 | Todos | Reportes unificados |
nvito-admin (Playwright)
Estructura
E2E — nvito-admin
e2e/
├── auth.setup.tsAutenticacion Clerk
├── fixtures/Helpers y datos de prueba
├── auth.fixture.ts
└── test-data.ts
├── pages/Page Object Model
├── sign-in.page.ts
├── events-list.page.ts
├── event-creation.page.ts
├── event-detail.page.ts
├── guests.page.ts
├── invitations.page.ts
└── admin/
├── users.page.ts
├── organizations.page.ts
└── templates.page.ts
└── specs/Tests organizados por dominio
├── auth/
├── events/
├── guests/
├── invitations/
├── admin/
└── error-states/
Ejecutar
# Todos los tests
npx playwright test
# Con UI interactiva
npx playwright test --ui
# Solo smoke tests
npx playwright test --grep @smoke
# Solo cross-browser (Chromium + Firefox)
npx playwright test --grep @cross-browser
Requisitos
- Variables de entorno:
E2E_CLERK_EMAIL,E2E_CLERK_PASSWORD - Server corriendo en
localhost:5050
Cobertura
| Dominio | Tests | Prioridad |
|---|---|---|
| Auth | 6 | P0-P1 |
| Events | 18 | P0-P2 |
| Guests | 14 | P0-P1 |
| Invitations | 10 | P0 |
| Admin | 8 | P1 |
| Error States | 4 | P1 |
| Total | 60 + 7 cross-browser = 67 |
nvito-invitations (Playwright)
Estructura
E2E — nvito-invitations
e2e/
├── specs/
├── invitation-render.spec.ts
├── invitation-not-found.spec.ts
├── preview-mode.spec.ts
├── revalidation-webhook.spec.ts
├── security-headers.spec.ts
├── performance-metrics.spec.ts
└── cross-browser.spec.ts
└── helpers/
└── test-constants.ts
Ejecutar
npx playwright test
npx playwright test --ui
Cobertura
| Dominio | Tests |
|---|---|
| Render invitaciones | 6 |
| 404/Not Found | 4 |
| Preview mode | 4 |
| Revalidation webhook | 5 |
| Security headers | 6 |
| Performance | 3 |
| Cross-browser | 3 + 10 cross |
| Total | 41 |
nvito-api (k6)
Estructura
Performance — nvito-api
test/performance/
├── config/
├── thresholds.jsUmbrales compartidos
└── auth-helpers.jsLogin mobile JWT
├── scenarios/
├── health.jsHealth + readiness
├── public-endpoints.jsRSVP, invitation, event-types
├── event-day-simulation.jsCheck-ins 200 VUs concurrentes
├── authenticated-crud.jsEvents/Guests CRUD
├── webhook-processing.jsClerk + revalidacion
└── media-upload.jsPresigned URLs
└── load-test.jsTest original (mantenido)
Ejecutar
# Escenarios individuales
npm run perf:health
npm run perf:public
npm run perf:event-day
# Escenarios P0 en secuencia
npm run perf:all
Umbrales
| Metrica | Umbral |
|---|---|
| p(50) latencia | < 200ms |
| p(95) latencia | < 500ms |
| p(99) latencia | < 1000ms |
| Error rate | < 1% |
| Health p(95) | < 100ms |
nvito-client (Maestro)
Estructura
E2E — nvito-client
maestro/
├── flows/
├── auth/Login host, guest, logout
├── host/Dashboard, guests, scanner, gallery
├── guest/Home, itinerary, gallery
└── navigation/Deep links
└── scripts/
├── run-ios.sh
└── run-android.sh
Ejecutar
# Instalar Maestro
curl -Ls "https://get.maestro.mobile.dev" | bash
# iOS
bash maestro/scripts/run-ios.sh
# Android
bash maestro/scripts/run-android.sh
# Flow individual
maestro test maestro/flows/auth/host-login.yaml
Cobertura: 13 flows
Dashboard Allure unificado (e2e-shared)
El proyecto e2e-shared genera un dashboard HTML unificado que combina metricas de los 5 proyectos usando Allure Report (Apache 2.0).
Arquitectura
Dashboard Allure — e2e-shared
e2e-shared/
├── allure/
└── categories.jsonCategorias: Producto, Infraestructura, Ignorados
├── docker/
└── docker-compose.e2e.ymlPostgreSQL (tmpfs) + Redis + MinIO
├── scripts/
├── generate-allure-report.shCombina resultados de los 5 proyectos
├── start-e2e-env.shLevanta entorno Docker aislado
└── stop-e2e-env.shDetiene entorno Docker
└── .env.e2e.exampleTemplate de variables E2E
Reporters por proyecto
Cada proyecto tiene Allure configurado de forma condicional con la variable de entorno ALLURE=1. Sin está variable, los tests corren normalmente sin overhead.
| Proyecto | Reporter | Configuración |
|---|---|---|
| nvito-api | allure-jest | testEnvironment: 'allure-jest/node' (condicional) |
| nvito-admin | allure-vitest | setupFiles + reporters en vitest.config.ts (condicional) |
| nvito-invitations | allure-vitest | setupFiles + reporters en vitest.config.ts (condicional) |
| nvito-client | allure-jest | testEnvironment: 'allure-jest/node' (condicional) |
| nvito-pwa | allure-vitest | setupFiles + reporters en vitest.config.ts (condicional) |
Generar resultados Allure
# Ejecutar tests con Allure habilitado (genera allure-results/)
cd nvito-api && npm run test:allure
cd nvito-admin && npm run test:allure
cd nvito-invitations && npm run test:allure
cd nvito-client && npm run test:allure
cd nvito-pwa && npm run test:allure
# E2E Playwright ya genera allure-results/ automáticamente (allure-playwright)
cd nvito-admin && npx playwright test
cd nvito-invitations && npx playwright test
Generar y abrir dashboard
# Combinar resultados de los 5 proyectos y generar reporte HTML
bash e2e-shared/scripts/generate-allure-report.sh
# Abrir en el navegador
allure open e2e-shared/allure-report
El script generate-allure-report.sh busca resultados en:
nvito-api/allure-results/(Jest unit)nvito-admin/allure-results/unit/(Vitest unit) +nvito-admin/allure-results/(Playwright E2E)nvito-invitations/allure-results/unit/(Vitest unit) +nvito-invitations/allure-results/(Playwright E2E)nvito-client/allure-results/(Jest unit)nvito-pwa/allure-results/unit/(Vitest unit)
Prerequisitos
# Instalar Allure CLI (requiere Java)
brew install allure
Docker Compose E2E
# Levantar entorno aislado
bash e2e-shared/scripts/start-e2e-env.sh
# Detener
bash e2e-shared/scripts/stop-e2e-env.sh
Servicios: PostgreSQL (tmpfs:5433), Redis (no-persist:6380), MinIO (tmpfs:9001).
GitLab CI
Cada proyecto tiene un stage e2e en su .gitlab-ci.yml:
- nvito-admin:
test:e2e:smoke-- Playwright smoke en MR - nvito-invitations:
test:e2e-- Playwright completo en develop/MR - nvito-api:
test:performance-- k6 manual en develop - nvito-client: Solo quality (typecheck + unit) -- Maestro requiere emulador
Metricas actuales
| Proyecto | Unit Tests | E2E Tests | Framework |
|---|---|---|---|
| nvito-api | 233 suites | 6 escenarios k6 | k6 |
| nvito-admin | 140 suites, 1,378 tests | 67 tests (14 specs) | Playwright |
| nvito-invitations | 16 suites, 180 tests | 41 tests (7 specs) | Playwright |
| nvito-client | 29 suites, 223 tests | 13 flows | Maestro |
| nvito-pwa | 18 suites, 204 tests | — | — |
| Total | 436 suites | 121+ E2E tests + 13 flows + 6 k6 |