ACM Editorial · 2026-11-28 · 2 min read
Test pure functions for validation, pricing and state transitions without starting Flutter.
Select the right test boundary
Test pure functions for validation, pricing and state transitions without starting Flutter. A widget test is a better fit when behaviour depends on rendering or user interaction. Use integration tests for real navigation, plugin calls and complete flows. A large collection of slow end-to-end tests is not a substitute for focused unit tests.
Create deterministic fixtures
Inject the clock, storage and network repositories so tests can run without external services. Build sample data in a helper rather than relying on a live account. Cover failure, empty, loading and success states; assert what a user can see and do, not every internal variable.
Check release-specific behaviour
Exercise Android back navigation, keyboard resize, rotation, text scaling and denied permissions on representative devices. Compare debug behaviour with a signed test release because performance and optimisation differ. Test upgrades with retained local data instead of reinstalling for every case.
Define acceptance criteria
For a quotation screen, verify a quantity change updates the total, validation prevents negative rates, and a failed save preserves the draft. For a file transfer, verify cancellation and recovery. Document which tests require a physical device or network.

