Sample project for talk on golden tests for Flutter Festival Germany 30.03.2022
-
This project uses the flutter sample app (
flutter create -t skeleton
) to showcase different ways of running golden tests -
The vanilla/imperative way is shown in
tests/vanilla_imperative_approach
-
A declarative approach to golden tests with the package Alchemist is shown in
test/alchemist_sample_golden_test.dart
andtest/app_golden_test.dart
-
Golden tests can be run like every other test using
flutter test
-
Updating the golden master image files is achieved by running
flutter test
with an additional option:flutter test --update-goldens