🧪 QA & Testing Strategy
Quality is not an accident. We adhere to a strict testing strategy to prevent regressions in this EIP project.
The Testing Pyramid
-
Static Analysis (Automated)
- Tool: SonarQube & ESLint.
- When: On every commit push (CI).
- Checks: Code smell, Cognitive Complexity, Bugs, Security Hotspots.
-
Unit Tests (Backend)
- Tool: Japa (AdonisJS native tester).
- Scope: Services and logic-heavy Helpers.
- Command:
node ace test
-
End-to-End (E2E) Tests
- Scope: Critical User Flows (Login -> View Camera -> Receive Alert).
- Method: Manual verification using the Staging Environment.
Coding Standards
Linting
We use eslint and prettier to enforce style.
- Rule: No
anyin TypeScript. - Rule: Components must be < 200 lines.
Commits
Follow Conventional Commits for clean history:
feat: add camera supportfix: resolve websocket connection dropdocs: update architecture diagram
Continous Integration (CI)
Our GitHub Actions workflow enforces:
- Build Pass: The code must compile.
- Lint Pass: No formatting errors.
- Sonar Quality Gate:
- 0 Critical Bugs.
- < 3% Duplication.
- A-grade Maintainability.