New In Flutter 2.8, Screenshot Goldens In Integration Testing
Well, we have this nice new Flutter 2.8 release. What new cool things can we do with it? We can now use screenshots to have goldens testing in integration testing.
What I am Using
I am using Beta Flutter 2.8, but this also works with regular stable Flutter 2.8. The other package we need to make it work is the integration testing package. And that is now with the Flutter SDK, although it will not see full inclusion as far as app templates until flutter .2.9 or flutter 3.0.
To use it, you have this in the pubspec:
dev_dependencies:
integration_test:
sdk: flutter
And our configuration is put in the test-driver subfolder:
To execute tests automatically like we can in tests, we set up each test like this: