~/talk

Testing Everything in Flutter

Talkat droidcon EMEA 2020 · 2020-10-08..10-09· [flutter, testing]
links:none on file
slides:none on file

A small GIF Review app is used to show three concrete test layers: fast pure Dart unit tests (example: an average-of-ratings function), widget tests that require wrapping widgets with Directionality and can pump/pumpAndSettle for animations, and slow device-level driver tests that require enableFlutterDriverExtension and running flutter_driver on app.dart. Dependency injection via constructor/provider/get_it makes fakes or Mockito mocks usable; network images fail with HTTP 400 in tests so add mock_network_image_for to return an empty image. Aim for ~70% coverage.

AI-written summary · about

  1. 0:00Introduction to testing in Flutter
  2. 1:16Types of Flutter tests overview
  3. 3:45Writing pure Dart tests
  4. 6:37Introduction to widget tests
  5. 10:54Running driver tests on devices
  6. 15:28Comparing test types in Flutter
  7. 16:51Making code easier to test
  8. 21:07Fakes vs mocks for dependencies
  9. 25:23Test pyramid and coverage in Flutter
  10. 31:09Edge cases in Flutter testing
  11. 35:47Recap and new testing features
  12. 36:55Q&A on native code testing
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.