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-nativefor 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:
-
Quality Gates:
- TypeScript Check:
tsc --noEmit - Linting:
npm run lint - Security:
npm audit
- TypeScript Check:
-
Testing:
- Runs Jest tests with coverage verification.
-
Build Validation:
- Expo Doctor: Checks for configuration issues.
- Web Export: Runs
expo exportto verify that the app builds successfully (as a web build proxy for general build health).
-
EAS Build Preview (PRs only):
- Triggers an EAS Build for the
previewprofile.
- Triggers an EAS Build for the
-
Production Build (Main branch only):
- Triggers an EAS Build for the
productionprofile (Android APK).
- Triggers an EAS Build for the
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.