Generated 2026-03-26 · GitHub
Unit and integration tests are grouped by what they verify. Each category tests a different layer of the application.
| Category | Files | Passed | Failed | What is Tested |
|---|---|---|---|---|
| ❌ Page & Layout Tests | 29 | 886 | 28 | Rendering, navigation, role-based access, and content verification for all 19 Next.js pages. |
| ❌ API Route Integration Tests | 19 | 76 | 5 | Full HTTP request/response testing of all API endpoints including error handling and mock fallbacks. |
| ✅ API Route Unit Tests | 13 | 232 | 0 | Unit-level testing of API route handlers — request parsing, query construction, and response formatting. |
| ✅ Component Tests | 8 | 127 | 0 | React component rendering, user interaction, accessibility, and state management. |
| ✅ Library & Config Tests | 10 | 159 | 0 | Neo4j driver, EDC client, Keycloak realm config, auth helpers, and shared utilities. |
| Total (Unit + Integration) | 356 | 1480 | 33 |
The test suite covers the full application stack — from individual React components and API route handlers up to end-to-end browser workflows that simulate real EHDS dataspace operations.
| Area | Details |
|---|---|
| 19 Next.js Pages | Graph Explorer, Dataset Catalog, Patient Journey, OMOP Analytics, EEHRxF Profiles, Compliance Chain, NL Query, Docs (4 pages), Portal (Onboarding, Credentials, Discover, Negotiate, Transfer, Share, Admin, Settings), Home |
| 16 API Routes | /api/catalog, /api/compliance, /api/analytics, /api/patient, /api/eehrxf, /api/graph, /api/nlquery, /api/participants, /api/tasks, /api/assets, /api/negotiations, /api/transfers, /api/admin/policies, /api/admin/tenants, /api/admin/audit, /api/health |
| 8 UI Components | LoginMenu, Navbar, DatasetCard, ComplianceChain, StatCard, PatientTimeline, AnalyticsChart, MermaidDiagram |
| 5 Core Libraries | Neo4j driver (connection pooling, query execution), EDC-V client (management API, QuerySpec), Keycloak realm (4 users, PKCE, role mappings), Auth helpers (session, RBAC middleware), Component info catalog (18 service descriptions) |
| EHDS Compliance | Article 33 EHR certification, Article 45–53 secondary use flow, HealthDCAT-AP W3C metadata, EEHRxF priority category coverage, ODRL policy structure, Verifiable Credential lifecycle |
| Dataspace Protocols | DSP 2025-1 catalog queries, contract negotiation state machine (6 states), transfer process lifecycle (4 states), DCP v1.0 participant identity, HttpData-PULL/PUSH transfer types |
166 browser-based tests simulate real user journeys through the EHDS dataspace — from participant onboarding to contract negotiation and data transfer. Tests run headless Chromium against the full Next.js application.
| EHDS Step | Journey | What is Verified |
|---|---|---|
| Step 0 | Identity & Participant Management | Keycloak SSO, 5 participants registered, DID identities, role-based access |
| Step 1 | Dataset Upload & Metadata | 9 datasets in HealthDCAT-AP catalog, FHIR/OMOP/ClinicalTrial types, Article 53 legal basis |
| Step 2 | Policy & Catalog Offering | ODRL policies per participant, catalog page rendering, dataset type classification |
| Step 3 | Discovery & Federated Search | Catalog filtering, NL Query page, Patient Journey, OMOP Analytics rendering |
| Step 4 | Contract Negotiation | DSP state machine (6 states), FINALIZED agreements, cross-border DIDs |
| Step 5 | Data Transfer & Viewing | Transfer lifecycle (4 states), HttpData-PULL type, contractId linking |
| Step 6 | Audit & Provenance | Audit logging, provenance chains, admin dashboard |
| Step 7 | EEHRxF & Compliance | 6 EHDS priority categories, HL7 Europe profile alignment, coverage scoring |
| Infra | Browser Errors & Smoke | Zero console errors on all pages, static asset integrity, navigation dropdowns |
| Tool | Purpose |
|---|---|
| Vitest 4 + React Testing Library | Unit tests, API route tests, component tests — jsdom environment |
| @vitest/coverage-v8 | Code coverage via V8 engine instrumentation |
| Playwright | End-to-end browser testing — headless Chromium, screenshots, traces |
| MSW (Mock Service Worker) | API mocking for deterministic offline testing |
| GitHub Actions | CI pipeline — lint, type-check, unit tests, E2E tests on every push |