1
0
Fork 0
mirror of https://github.com/s-frick/effigenix.git synced 2026-03-28 10:19:35 +01:00
effigenix/test-automation/TASKS.md
2026-03-27 17:52:56 +01:00

99 lines
4.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Test Automation Aufgaben & Phasen
Branch: `experiment/test-automation`
Konzept: [`docs/ui-testing-automation.md`](./docs/ui-testing-automation.md)
> **Merge-Regel:** Kein Merge in `main` ohne ausdrückliche menschliche Bestätigung.
---
## Phase 0 TUI-Tests ausbauen
> Sofort umsetzbar, kein neues Setup nötig. Nutzt `ink-testing-library` + `vitest`.
> Ort: `frontend/apps/cli/src/__tests__/screens/`
- [x] `__tests__/screens/` Verzeichnisstruktur anlegen (`masterdata/`, `production/`)
- [x] `SupplierForm.test.tsx` TC-SUP-01 (Pflichtfelder), TC-SUP-02, TC-SUP-03 (leerer Name)
- [x] `CategoryForm.test.tsx` TC-CAT-01 (Happy Path), TC-CAT-04 (Duplikat), TC-CAT-06 (leerer Name)
- [x] `SupplierList.test.tsx` TC-SUP-06 (Filter/Suche)
- [x] Bestehende 4 Tests (`ConfirmDialog`, `ErrorDisplay`, `SuccessDisplay`, `useRoles`) als Vorlage prüfen
- [x] Alle neuen TUI-Tests laufen durch (`pnpm --filter @effigenix/cli test`)
---
## Phase 1 API E2E Grundgerüst
> Playwright-Setup in `test-automation/web-ui/`. API-Tests ohne Browser.
- [x] `web-ui/package.json` finalisieren (standalone, kein Workspace-Eintrag nötig)
- [x] `web-ui/playwright.config.ts` validieren und anpassen
- [x] `web-ui/fixtures/auth.fixture.ts` implementieren (viewer-Passwort: test1234)
- [x] `web-ui/fixtures/seed.fixture.ts` implementieren (Strategie: Option B UUID-Suffixe)
- [x] `web-ui/helpers/api-client.ts` typisiert implementieren
- [x] Backend `Dockerfile` erstellen (Multi-stage Maven + JRE, Profil via SPRING_PROFILES_ACTIVE)
- [x] `docker-compose.e2e.yml` validieren (Profil auf `e2e` korrigiert, Viewer-Passwort angepasst)
- [x] `web-ui/Dockerfile` korrigiert (standalone pnpm install, kein Workspace)
- [x] `application-e2e.yml` + Liquibase-Changeset 039 (admin + viewer e2e-Benutzer)
- [x] Erste Spec: `tests/api/masterdata/categories.spec.ts` (TC-CAT, Issue #62)
- [x] Erste Spec: `tests/api/masterdata/suppliers.spec.ts` (TC-SUP-01 ACTIVE korrigiert, Issue #63)
- [ ] End-to-end-Run lokal erfolgreich: `docker compose -f test-automation/docker-compose.e2e.yml up`
- [x] `just test-e2e` Recipe im `justfile` ergänzt
---
## Phase 2 Vollständige API-Coverage
> Alle manual-testing Issues und Feature-Stories als Playwright-Specs.
- [x] `tests/api/masterdata/customers.spec.ts` TC-CUS, Issue #65
- [x] `tests/api/masterdata/contracts.spec.ts` TC-B2B, Issue #66
- [x] `tests/api/masterdata/articles.spec.ts` TC-ART, Issue #64
- [x] `tests/api/auth/authorization.spec.ts` TC-AUTH, Issue #67 (erweitert auf 7 TCs)
- [x] `tests/api/production/orders.spec.ts` US-P13P17, Issues #38#42
- [x] `tests/api/production/batches.spec.ts` US-P09P12, Issues #33#36
- [x] `tests/api/production/recipes.spec.ts` US-P02P08, Issues #26#32
- [x] `tests/api/production/traceability.spec.ts` US-P18P19, Issues #43#44
- [x] `tests/api/inventory/stock.spec.ts` Story 2.x6.x, Issues #4#20
- [x] `tests/api/inventory/movements.spec.ts`
- [x] `tests/api/inventory/reservations.spec.ts`
- [x] `tests/api/inventory/inventory-counts.spec.ts`
- [x] Test-Generierungs-Skript (`scripts/generate-tests-from-issue.ts`) finalisieren
- [x] Skript in `justfile` als `just generate-test <issue-nr>` integrieren
- [ ] Alle Specs im Docker-Stack grün
---
## Phase 3 CI/CD Integration
> GitHub Actions Workflow für automatische Test-Ausführung.
- [x] `.github/workflows/e2e.yml` erstellen
- [x] Trigger: Push auf `main`, PRs gegen `main` (+ `workflow_dispatch`)
- [x] JUnit-Report als CI-Artefakt hochladen (30 Tage Retention)
- [x] Playwright HTML-Report als CI-Artefakt hochladen (7 Tage Retention)
- [x] Badge in README einbinden
---
## Phase 4 Web UI Tests (Browser)
> Erst sinnvoll, wenn `apps/web` ausgebaut ist. Platzhalter bereits vorhanden.
- [ ] Browser-Projekt in `playwright.config.ts` aktivieren (`web-chromium`)
- [ ] Page Object Models für Web-App-Seiten anlegen
- [ ] Login-Flow als Browser-Test
- [ ] Erste Screen-Tests (analog zu TUI-Tests in Phase 0)
- [ ] Visuelle Regression via Playwright Screenshots (optional)
---
## Offene Punkte & Entscheidungen
| Punkt | Status | Massnahme |
|---|---|---|
| Backend `Dockerfile` | ✅ Erledigt | Multi-stage Maven + JRE, `SPRING_PROFILES_ACTIVE: e2e` |
| Seed-Testdaten Isolation | ✅ Erledigt | Option B: UUID/Timestamp-Suffixe, kein DB-Reset nötig |
| `gh` Token `read:project` Scope | Offen | `gh auth refresh -s read:project` ausführen wenn nötig |
| TUI-Tests Abgrenzung | ✅ Klar | Vitest + ink-testing-library, gemockte API-Calls |
| Scanner (Tauri/mobil) | Out of scope | Separates Konzept, ggf. `test-automation/scanner/` später |
| Lokaler E2E-Run verifiziert | Offen | `just test-e2e` ausführen (benötigt Docker + ~5 Min. Maven-Build) |