Quality Assurance & Testing Strategy
To maintain the high reliability of the VENI-AI platform, we employ a multi-layered testing strategy. Every satellite must adhere to these standards to ensure seamless integration within the Shell.
🧪 The Testing Tiers
1. Unit Tests
- Scope: Individual functions, services, and utilities.
- Backend: Vitest + Ignis mock utilities.
- Frontend: Vitest + React Testing Library.
- Target: 80%+ coverage for business logic.
2. Integration Tests
- Scope: Controller-to-Service and Service-to-Database flows.
- Backend: Supertest + PostgreSQL (Test Containers or local test DB).
- Frontend: Component integration testing with MSW (Mock Service Worker).
3. End-to-End (E2E) Tests
- Scope: Critical user journeys across Shell and Satellites.
- Tool: Playwright.
- Required Scenarios:
- Login via Keycloak -> Redirect to Shell.
- App switching via Launchpad.
- File upload/download in Drive.
- Leave request cycle in HRM.
🏗️ Technical Standards
Contract-First Development
- All inter-service communication (gRPC) must be tested against the Protobuf definitions.
- Changes to
protos/require a full regression suite run for affected satellites.
Dependency Injection (DI)
- Use the
@injectdecorator in Ignis v2 to decouple services. - Always provide mock implementations for external dependencies (e.g.,
EmailService,S3Client) during unit tests.
🚀 Automated Validation (CI)
Our GitHub Actions pipeline runs the following checks on every pull request:
- Linting:
npm run lint(ESLint + Prettier). - Type Checking:
tsc --noEmit. - Tests:
npm test. - Build:
npm run build(Ensures production bundle integrity).
Blocked Merges
Pull requests cannot be merged if any automated check fails or if coverage decreases significantly.