Skip to main content

🧪 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

  1. Static Analysis (Automated)

    • Tool: SonarQube & ESLint.
    • When: On every commit push (CI).
    • Checks: Code smell, Cognitive Complexity, Bugs, Security Hotspots.
  2. Unit Tests (Backend)

    • Tool: Japa (AdonisJS native tester).
    • Scope: Services and logic-heavy Helpers.
    • Command: node ace test
  3. 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 any in TypeScript.
  • Rule: Components must be < 200 lines.

Commits

Follow Conventional Commits for clean history:

  • feat: add camera support
  • fix: resolve websocket connection drop
  • docs: update architecture diagram

Continous Integration (CI)

Our GitHub Actions workflow enforces:

  1. Build Pass: The code must compile.
  2. Lint Pass: No formatting errors.
  3. Sonar Quality Gate:
    • 0 Critical Bugs.
    • < 3% Duplication.
    • A-grade Maintainability.