Testing
Project Test Strategy
| Layer | Required tests |
|---|---|
| Contracts | OpenAPI linting, breaking-change detection, generated-client freshness |
| Backend | unit, repository, service, REST, authorization, migration |
| Web | lint, typecheck, component, integration, Playwright E2E |
| Mobile | analysis, unit, widget, mocked-client, integration |
| Cross-platform | full vertical-slice E2E |
Current POC
cd reference/mobile_app_demo
flutter analyze
The current checkout has no test/ directory. Before promoting the POC, add coverage for:
- event queue insert/query/mark synced;
- queue migrations;
- sync retry and duplicate handling;
- OCR parser fallbacks;
- tag replacement invariants;
- receiving and commit flow widgets.
Backend Test Targets
./gradlew test
./gradlew integrationTest
Use Testcontainers for PostgreSQL integration tests.
Web Test Targets
npm run lint
npm run typecheck
npm run test
npm run e2e
npm run build
Mobile Test Targets
flutter analyze
flutter test
flutter test integration_test
flutter build apk
CI Gate
A pull request should pass:
- contract checks;
- backend tests;
- web lint/typecheck/tests/build;
- mobile analysis/tests/build;
- secret and dependency scanning;
- migration validation.