Skip to content
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

automated screenshotting #16

Open
erosson opened this issue May 30, 2020 · 1 comment
Open

automated screenshotting #16

erosson opened this issue May 30, 2020 · 1 comment
Labels
dev-tools improve the developer/maintainer experience

Comments

@erosson
Copy link
Owner

erosson commented May 30, 2020

mostly for play store/app store updates, but also for other sorts of promotion and app store localization

so far I've mostly done manual screenshotting with some ad-hoc convert/mogrify resizing

https://docs.fastlane.tools/getting-started/android/screenshots/

https://docs.fastlane.tools/getting-started/ios/screenshots/ (though this likely requires a mac)

quirk used fastlane for releasing apk/ipa builds - maybe there's even some screenshot automation already that I haven't found yet? I don't really know fastlane

@erosson erosson added the dev-tools improve the developer/maintainer experience label May 30, 2020
erosson added a commit that referenced this issue Jun 3, 2020
@erosson
Copy link
Owner Author

erosson commented Jun 3, 2020

storybook seems like a winning approach for visualizing the ui states (including the hard part, i18n) we want to screenshot. not only can we browse ui states at our leisure, we get jest snapshot tests for free with storyshots! some pages may take some refactoring for this to work well, but that's very doable - no different than any other integration test, and way better than simulating clicks to setup the state we want to screenshot. I've used storybook before and have this part working.

frameit looks promising for fancypants screenshot postprocessing, though I haven't tried it yet. maybe later.

actually taking the screenshots automatically has been a bit harder:

  • screengrab was what I'd hoped to use, but it appears to require ejecting from expo. also, no good for ios (though that's not a showstopper, we can fake it by hiding system ui)
  • storycap refuses to connect to my @storybook/react-native-server, so it does nothing. debugging/troubleshooting has failed me, including the usual suspects of wipe/reinstall node_modules and local-network-ip instead of localhost.
  • takeSnapshotAsync looks promising, but it appears gone in the latest version of expo, and I'd have to do quite a bit of test setup to use it since it's much lower-level than screengrab/storycap

also, all of these require an emulator - inevitably making CI runs slow and flaky, or if we leave it out of ci for faster runs, dep upgrades will break it when we need it.

...I think this automation is starting to cost more than the task it's automating. it might be best to take screenshots manually. if storybook's managing ui state for us, manual screenshotting is still tedious but not painful, and we don't have to do it often - and if we do solve automated screenshotting, storybook's still good for state management.

erosson added a commit that referenced this issue Jun 4, 2020
erosson added a commit that referenced this issue Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev-tools improve the developer/maintainer experience
Projects
None yet
Development

No branches or pull requests

1 participant