erosson / freecbt

✨🐙 A GPL Licensed Cognitive Behavioral Therapy app for iOS and Android
https://freecbt.erosson.org
GNU General Public License v3.0
102 stars 17 forks source link

automated screenshotting #16

Open erosson opened 4 years ago

erosson commented 4 years ago

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 commented 4 years ago

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:

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.