Writing better tests with less work
summary
Argues that most value of tests is catching future regressions and that Flutter has “more tests than implementation,” so tests must be cheaper and clearer. Recommends tight, narrative tests that extract boring details into helpers, test at bindings / stable interfaces (fake HTTP responses feeding the real model), and control time with fake_async plus an awaitFakeAsync helper. Shows Zulip Flutter examples, advises widget finders over find-by-type, and suggests using package flutter_checks for typed assertions so tests run faster, fail less, and are easier to update.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 1:47Why we write tests
- 3:13Reducing test costs
- 4:57Clear test narratives
- 9:18Simplify tests
- 13:34Zulip app examples
- 17:10Right test layer
- 22:07Stable test interfaces
- 24:58UI tests with real code
- 27:45Stable UI interfaces
- 31:13Fake async time
- 34:42Typed assertions with package:checks
- 36:52Summary & Q&A
related talks
41mThe art of Flutter testing
38mFlipping the Testing Pyramid
51mAll About Testing Flutter
32mexpect(isTestingInFlutterEasy, isTrue);
30mCat-like Development: Flutter for Efficiency
29mTesting in Practice: Keeping Your Tests Concise and Declarative
37mClean Test Code
44mTesting the untestable - patterns and use cases analysis
