-
Notifications
You must be signed in to change notification settings - Fork 0
Testing
aiserrock edited this page Jul 8, 2026
·
1 revision
Located in test/unit/, organized by layer (cubit/, formz/, service/, util/).
- Framework:
mocktailfor mocking dependencies,bloc_testfor cubit/bloc state assertions. - Mock external dependencies (repositories, services); never hit real network/DB in unit tests.
- Run:
fvm flutter testLocated in integration_test/ (e.g. app_smoke_test.dart), powered by Patrol.
- Configured via the
patrol:block inpubspec.yaml(app name, Android package, iOS bundle id per flavor). - Runs on a real/simulated device or emulator, exercising full app flows.
- Run:
patrol test --flavor dev- Every new feature must ship with corresponding unit/bloc tests, and E2E coverage for critical user flows.
- Every bug fix must include a regression test that fails before the fix and passes after.
- Prefer unit/bloc tests for logic; reserve Patrol E2E tests for flows that cross widget/navigation boundaries.