What are the three types of tests in Flutter?
Flutter has unit tests (pure Dart logic, no UI), widget tests (render a single widget in a test environment...
10 questions
Unit, widget, integration, golden, bloc_test
Flutter has unit tests (pure Dart logic, no UI), widget tests (render a single widget in a test environment...
pumpWidget() renders a widget for the first time. pump() advances the clock one frame (for animations/timer...
Mockito uses code generation (@GenerateMocks + build_runner) to create type-safe mocks. Mocktail uses Dart'...
The bloc_test package provides blocTest<B, S>() that adds events, then asserts an expected sequence of emit...
Golden tests capture a widget's rendered screenshot and compare it pixel-by-pixel against a stored referenc...
Use the find object: find.text(), find.byType(), find.byKey(), find.byIcon(), find.ancestor(). Then interac...
Run flutter test --coverage to generate an lcov.info file. Use lcov or genhtml to convert it to HTML. Targe...
Use ProviderContainer for unit-testing providers in isolation. For widget tests, wrap with ProviderScope an...
integration_test runs tests inside the Flutter app on a real or emulated device. Tests share the same proce...
Stub: returns pre-programmed responses. Mock: also verifies interactions (calls made). Spy: wraps real obje...