Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Screenshot your Entire App with Screengrab and ...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Edward Dale
November 03, 2016
Technology
500
0
Share
Screenshot your Entire App with Screengrab and Firebase
Presentation from the GDG Munich Android meetup
Edward Dale
November 03, 2016
More Decks by Edward Dale
See All by Edward Dale
Write your own ProGuard
scompt
1
230
ProGuard
scompt
1
520
Screenshot your Entire App
scompt
1
2k
Reactive In-App Billing on Android
scompt
2
330
Fitness Motion Recognition with Android Wear
scompt
1
490
Android Apps with Mortar and Flow
scompt
7
1.7k
Functional Reactive Programming in the Mobile World
scompt
2
370
Other Decks in Technology
See All in Technology
スクラムを支える内部品質の話
iij_pr
0
260
"まず試す"ためのDatabricks Apps活用法 / Databricks Apps for Early Experiments and Validation
nttcom
1
170
I ran an automated simulation of fake news spread using OpenClaw.
zzzzico
1
900
Claude Teamプランの選定と、できること/できないこと
rfdnxbro
1
500
Embeddings : Symfony AI en pratique
lyrixx
0
460
AgentCore RuntimeからS3 Filesをマウントしてみる
har1101
2
170
AIを活用したアクセシビリティ改善フロー
degudegu2510
1
140
解剖"React Native"
hacusk
0
110
会社紹介資料 / Sansan Company Profile
sansan33
PRO
16
410k
Microsoft Fabricで考える非構造データのAI活用
ryomaru0825
0
650
マルチモーダル非構造データとの闘い
shibuiwilliam
1
180
Data Enabling Team立ち上げました
sansantech
PRO
0
270
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
260
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Rails Girls Zürich Keynote
gr2m
96
14k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
Designing for humans not robots
tammielis
254
26k
Raft: Consensus for Rubyists
vanstee
141
7.4k
Crafting Experiences
bethany
1
110
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.4k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
700
Transcript
Screenshot your Entire App Edward Dale Freeletics © Edward Dale,
2016 1
Screenshot your Entire App with Screengrab and Firebase Edward Dale
Freeletics © Edward Dale, 2016 2
Find the bug(s) © Edward Dale, 2016 3
© Edward Dale, 2016 4
© Edward Dale, 2016 5
Some things are best verified visually ! Screenshot © Edward
Dale, 2016 6
Screenshots are useful for • Acceptance testing • Edge case
• Localization • Multiple devices • Regression testing © Edward Dale, 2016 7
Screenshot testing tools • Espresso tests • Dependency injection •
Dependency mocking • Screengrab • Firebase Cloud Test Lab for Android © Edward Dale, 2016 8
Espresso test setup @MediumTest public class BuyCoachScreenGrab { @Inject DummyUserManager
mUserManager; @Rule public ActivityTestRule<BuyCoachActivity> mActivityRule = new ActivityTestRule<>(BuyCoachActivity.class, false, false); © Edward Dale, 2016 9
Automated localized screenshots of your Android app on every device
Screengrab ▶ Fastlane ▶ Fabric ▶ Twitter Combination of command-line tool and classes used in tests © Edward Dale, 2016 10
Screengrab test @Test public void testTestimonialMale() { when(mUserManager.getUser().getGender()).thenReturn(Gender.MALE); mActivityRule.launchActivity(new Intent());
onView(withId(R.id.feature_pager_videos)).perform(scrollTo()); Screengrab.screenshot("buy_coach_male_testimonial"); } © Edward Dale, 2016 11
Screengrab test @Test public void testTestimonialMale() { when(mUserManager.getUser().getGender()).thenReturn(Gender.MALE); mActivityRule.launchActivity(new Intent());
onView(withId(R.id.feature_pager_videos)).perform(scrollTo()); Screengrab.screenshot("buy_coach_male_testimonial"); } @Test public void testTestimonialFemale() { when(mUserManager.getUser().getGender()).thenReturn(Gender.FEMALE); mActivityRule.launchActivity(new Intent()); onView(withId(R.id.feature_pager_videos)).perform(scrollTo()); Screengrab.screenshot("buy_coach_female_testimonial"); } © Edward Dale, 2016 12
Screengrab configuration app_package_name 'com.freeletics.debug' app_apk_path 'Freeletics-debug.apk' tests_apk_path 'Freeletics-debug-androidTest.apk' locales ['en-US',
'fr-FR', 'it-IT', 'de-DE', 'pt-PT', 'es-ES', 'tr-TR', 'ja-JA'] use_tests_in_classes ['com.freeletics.coach.view.BuyCoachScreenGrab'] © Edward Dale, 2016 13
Running Screengrab $ ./gradlew clean assembleDebug assembleDebugTest $ screengrab ©
Edward Dale, 2016 14
Firebase Cloud Test Lab for Android Test your app on
devices hosted in a Google datacenter. Combination of command-line tool and classes used in tests Also supports virtual devices © Edward Dale, 2016 15
Firebase Cloud Test Lab for Android Test your app on
devices hosted in a Google datacenter. Combination of command-line tool and classes used in tests Also supports virtual devices $€£¥ © Edward Dale, 2016 16
Firebase test @Test public void testTestimonialMale() { when(mUserManager.getUser().getGender()).thenReturn(Gender.MALE); Activity activity
= mActivityRule.launchActivity(new Intent()); onView(withId(R.id.feature_pager_videos)).perform(scrollTo()); ScreenShotter.takeScreenshot("buy_coach_male_testimonial", activity); } © Edward Dale, 2016 17
Screengrab Screengrab.screenshot("buy_coach_male_testimonial"); Firebase ScreenShotter.takeScreenshot("buy_coach_male_testimonial", activity); © Edward Dale, 2016 18
Running Firebase gcloud beta test android run --type instrumentation --app
Freeletics-debug.apk --test Freeletics-debug-androidTest.apk --device-ids Nexus6 --os-version-ids 21 --locales en-US,fr-FR,it-IT,de-DE,pt-PT,es-ES,tr-TR,ja-JA --orientations portrait --test-targets "class com.freeletics.coach.view.BuyCoachScreenGrab" Also possible to stick this in a YML configuration file. © Edward Dale, 2016 19
Screengrab vs Firebase Fight! © Edward Dale, 2016 20
Screengrab • ✅ Free • ✅ No waiting for a
free device • ❌ Limited by your devices © Edward Dale, 2016 21
Firebase • ✅ Easy to setup a test matrix •
✅ Fits well with a CI system • ❌ Have to wait your turn • ❌ Costs money • $5/hour for real device • $1/hour for virtual device © Edward Dale, 2016 22
My suggestion Use both © Edward Dale, 2016 23
Cross-platform test @Test public void testTestimonialMale() { when(mUserManager.getUser().getGender()).thenReturn(Gender.MALE); Activity activity
= mActivityRule.launchActivity(new Intent()); onView(withId(R.id.feature_pager_videos)).perform(scrollTo()); ScreenShotter.takeScreenshot("buy_coach_male_testimonial", activity); Screengrab.screenshot("buy_coach_male_testimonial"); } Screengrab for daily development Firebase for CI regression testing © Edward Dale, 2016 24
Thanks! Edward Dale (@scompt) Freeletics (We're hiring) © Edward Dale,
2016 25