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
Oracle AI Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
5
1.3k
Bref でサービスを運用している話
sgash708
0
220
Babylon.js Japan Activities (2026/4)
limes2018
0
150
I ran an automated simulation of fake news spread using OpenClaw.
zzzzico
1
520
AIエージェント時代に必要な オペレーションマネージャーのロールとは
kentarofujii
0
290
OpenClaw初心者向けセミナー / OpenClaw Beginner Seminar
cmhiranofumio
0
240
PostgreSQL 18のNOT ENFORCEDな制約とDEFERRABLEの関係
yahonda
1
210
Oracle Cloud Infrastructure:2026年3月度サービス・アップデート
oracle4engineer
PRO
0
320
JSTQB Expert Levelシラバス「テストマネジメント」日本語版のご紹介
ymty
0
110
Databricks Lakebaseを用いたAIエージェント連携
daiki_akimoto_nttd
0
120
制約を設計する - 非決定性との境界線 / Designing constraints
soudai
PRO
4
910
AIにより大幅に強化された AWS Transform Customを触ってみる
0air
0
280
Featured
See All Featured
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
250
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.5k
Between Models and Reality
mayunak
3
250
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
490
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
260
Designing for Performance
lara
611
70k
AI: The stuff that nobody shows you
jnunemaker
PRO
4
500
Technical Leadership for Architectural Decision Making
baasie
3
300
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
64
53k
Deep Space Network (abreviated)
tonyrice
0
100
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
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