Build a complete testing skill for Flutter — unit tests for logic, widget tests for UI, mocktail for dependencies, plus golden and integration tests. You finish able to test apps with confidence, catching regressions before they reach users and shaping UI test-first.
Watch the free preview
Your first unit test with flutter_test — free to watch, no account needed.
What you'll learn
- Test Flutter apps with confidence across unit, widget and integration levels
- Write widget tests using pumpWidget, finders and matchers to assert UI behaviour
- Isolate dependencies with mocktail stubs and verify interactions
- Test asynchronous code, streams and state notifiers deterministically
- Introduce golden tests and drive UI development test-first
Syllabus
Unit Testing Foundations
Your first unit test with flutter_testFree preview
Testing async code, streams and exceptions
Widget Testing
pumpWidget, finders and matchers
Interactions, pump and pumpAndSettle
Mocking and Testing State
Isolating dependencies with mocktail
Testing state management and notifiers
Golden, Integration and Test-Driven UI
An introduction to golden tests
Integration tests and test-driven UI
Lab — 10 Exercises & Solutions
Exercises 1–5
Exercises 6–10