Unit tests within the UMS Mono-repo are strictly focused on isolated logic. The scope is explicitly divided into:
- Web (Frontend / React): Validates isolated reducers, hooks, domain schemas (Zod), and standalone UI components without relying on live APIs.
- API (Backend / .NET): Validates POCO entities, bounded context rules, and MediatR handlers. Focuses on Result-pattern assertions and business logic isolation.
- DB (Database / EF Core): Validates specific
DbContextconfiguration, model mapping, and query expressions (mocked at the DbSet level or via In-Memory DB) without requiring a live SQL Server instance.
Based on the latest QA cycle:
- Framework: .NET 10 / xUnit
- Total Tests Executed: 607
- Passed: 607
- Failed: 0
- Status: PASSING.
- Key Covered Scenarios:
AuthMethodResolverTests: Validating IDP vs Internal routing logic.AuthorizationGraphBuilderServiceTests: Verifying correct aggregation of nested role permissions and feature flags.
- Framework: React 18 / Vitest
- Total Tests Executed: 1,476
- Passed: 1,476
- Failed: 0
- Status: PASSING.
- Key Covered Scenarios:
auth.store.test.ts: Validates Session start, timeout and overwrite flows.tenant.schema.test.ts: Validates strict tenant Zod typings.
- Framework: .NET 10 / xUnit (In-Memory Provider)
- Total Tests Executed: Included in the 607 Backend tests.
- Passed: 100%
- Failed: 0
- Status: PASSING.
- Key Covered Scenarios:
DbContextschema validations and mapping.- Repository mock verifications and query simulations.
The system's core business logic maintains over 95% isolated coverage. All minor test failures related to recent UI Label shifts and strict mode violations have been resolved, achieving 100% test success across both Backend and Frontend.