Skip to main content

Mobile QA & Testing Strategy

This section outlines the testing strategy, workflows, and technologies used in the mobile-app repository.

πŸ›  Technology Stack​

  • Framework: React Native with Expo
  • Language: TypeScript
  • Navigation: Expo Router / React Navigation
  • State Management: Zustand, TanStack Query
  • Testing Framework: Jest (with jest-expo)
  • Linting: ESLint (Expo config)

πŸ§ͺ Testing Strategy​

We primarily use Jest for unit and component testing.

Unit & Component Tests​

  • Located in tests/ directory (e.g., tests/api/).
  • Uses @testing-library/react-native for component interaction tests.
  • Run locally:
    npm test

πŸ”„ CI/CD Workflows​

1. CI Pipeline (ci.yml)​

Triggers on push and pull_request to main and dev.

Stages:

  1. Quality Gates:

    • TypeScript Check: tsc --noEmit
    • Linting: npm run lint
    • Security: npm audit
  2. Testing:

    • Runs Jest tests with coverage verification.
  3. Build Validation:

    • Expo Doctor: Checks for configuration issues.
    • Web Export: Runs expo export to verify that the app builds successfully (as a web build proxy for general build health).
  4. EAS Build Preview (PRs only):

    • Triggers an EAS Build for the preview profile.
  5. Production Build (Main branch only):

    • Triggers an EAS Build for the production profile (Android APK).

2. SonarQube Analysis (sonar.yml)​

  • Runs tests with coverage generation (npm run test:ci).
  • Scans code for bugs, vulnerabilities, and code smells.
  • Enforces Quality Gate checks.

β™Ώ Accessibility​

  • Linting: Accessibility rules enforced via ESLint.
  • Manual Testing: VoiceOver/TalkBack testing on devices is recommended manually.