-
-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatic screenshot generation for Marketing & Tests #217
Comments
Judging from the issues in the repo, it seems the package is not maintained anymore, which is a pity |
@rolandgeider oh that's a shame, have you found an alternative for your project? |
sadly not, but I also haven't looked much into it. It's somehow possible to save the current screen contents to a file, but nothing so easy as that package, I was hoping you guys would have some ideas 😅 |
@rolandgeider I have not yet dealt with the topic much more either, if I find a solution I will let you know. |
FYI, I have found this which looks promising, using only the flutter driver: https://medium.com/flutter-community/testing-flutter-ui-with-flutter-driver-c1583681e337 however it seems flutter_driver and flutter_launcher_icons have dependency incompatibilities 🙄 so I couldn't test it |
@rolandgeider I don't think we have a real alternative to the screenshot package. Currently only a not merged fork supports null-safety. Its not future proof but its probably the best way to go for now. |
Someone suggested to transfer the package to the FlutterCommunity, hopefully it gets accepted. |
For the record, in another project I developed a shell that can change the language of the iOS simulator and run tests - which include screenshots. |
Two days ago in the fellowship frontend workgroup sync @gspencergoog mentioned screenshot tests. That gave me the idea that we might be able to abuse a screenshot testing tool to generate screenshots for fastlane. I couldn't find the one he mentioned but golden_toolkit (by ebay) looks very promising. A article with some additional information: https://medium.com/flutter-community/flutter-screenshot-testing-as-a-solid-ui-regression-tool-630221a621e4 |
The one Flutter uses is Skia Gold. I don't think we can use their servers directly, unless we want to just use their code and set up our own instance that uses Google Cloud (it is open source, at least). I could ask the Skia team how hard/expensive it is to set up if you like. |
Anyway we need iOS screenshots (minimum is one in 3 different screen sizes in English), without that it's not possible to have it in the AppStore (maybe OK in TestFlight, though). |
@gspencergoog thanks for the offer, but I think it is easier and more uniform to do the process (at least for generations not for tests) with the goolden_toolkit and github actions. We only have to think about if plain screenshots are to booring and if so how we edit them. |
Hey @M123-dev, you're supposed to be on vacation! ;) |
@M123-dev That makes sense. |
@monsieurtanuki note: I've managed to automate running the Screenshot tests suites on GitHub Actions for the classic apps, so we can run them on all platforms without blocking a personal computer |
@teolemon That means classic Android and classic iOS apps, but not flutter so far, right? |
Impacted files: * `pubspec.lock`: impacted by `pubspec.yaml`. * `pubspec.yaml`: upgraded the version numbers.
Impacted files: * `main.dart`: added a comment. * `screenshot_driver.dart`: removed a "forbidden" `print` statement.
New files: * `app_test.dart`: Onboarding screenshots. * `screenshot_driver.dart`: Screenshot driver. Impacted files: * `analytics_helper.dart`: added a special case for screenshot init. * `main.dart`: refactored for screenshots, and more specifically moved init code to be run before calling the app. * `next_button.dart`: added a `Key` for test/screenshots * `Podfile.lock`: wtf * `pubspec.lock`: impacted by `pubspec.yaml` * `pubspec.yaml`: added integration_test and flutter_driver to dev_dependencies; upgraded the version numbers.
Something like ``` flutter drive --driver=test_driver/screenshot_driver.dart --target=integration_test/app_test.dart \ --dart-define=LANGUAGE=fr --dart-define=COUNTRY=FR --dart-define=PLATFORM=ios --dart-define=DEVICE=iPhone8Plus ``` Impacted files: * `app_test.dart`: added shell parameters * `Podfile.lock`: wtf * `pubspec.lock`: wtf
Something like ``` flutter drive --driver=test_driver/screenshot_driver.dart --target=integration_test/app_test.dart \ --dart-define=LANGUAGE=fr --dart-define=COUNTRY=FR --dart-define=PLATFORM=ios --dart-define=DEVICE=iPhone8Plus ``` Impacted files: * `app_test.dart`: added shell parameters * `Podfile.lock`: wtf * `pubspec.lock`: wtf
Mmm why I am assigned to this issue? |
unsure, fixing this |
What
Tasks
Write UI test to create the screenshots
Other tasks
fastlane frameit
How
Since Fastlane has no direct support for flutter screenshots, I think this could help.
Part of
The text was updated successfully, but these errors were encountered: