SlideShare a Scribd company logo
Consistent Android testing
environments using Gradle
Drew Hannay (@drewhannay)
Project Voyager
● Recently released
LinkedIn app rewrite
● 140+ committers
● 50+ regular committers
● ~1 year of development
3x3
● 3 releases per day
● No more than 3 hours from commit to publish
● Heavy focus on automation to increase confidence in releases
● Needs to be FAST - but also reliable
● Big investment in Espresso and Android Testing Support Library
UI Testing is Hard
● Android Emulator, Genymotion, physical devices
● Practically infinite number of screen sizes
● Different configs; RAM, heap size, hardware features…
● Tests passed locally, but failed on the build server or other dev machines
● Developers were unhappy
Enter Gradle
● Script to start emulators was deployed to each build machine
● Creating a new emulator from scratch every time = SLOW
● Only capable of starting a single emulator at a time
● Already using Gradle to get consistent builds across machines
● Why should tests be different?
What’s an emulator/AVD?
~/.android/avd/
MyAVD.ini
MyAVD.avd/
config.ini
hardware-qemu.ini
emulator-user.ini
cache.img
sdcard.img
userdata.img
userdata-qemu.img
android-sdk/system-images/
android-21/default/x86/
build.prop
kernel-qemu
source.properties
system.img
userdata.img
ramdisk.img
Shipped by Google Created on launch
Emulator Skins Skin No Skin
sdk/platforms/android-21/
skins/{skin-name}/
hardware.ini
layout
{control-name}.png
emulator-bundle.tar.gz
{user data files}
system/
{system files}
● Gradle project that outputs these bundles as
artifacts
● Download fresh system images from Google
● Creates sdcard img (since many tests depend
on this existing!)
● Start the AVD once to cause user files to be
created
● Bundle system + user files into a tar artifact
Standalone bundles
Custom Gradle Plugin
apply plugin: 'com.linkedin.android-emulators'
● Tasks for extracting and starting AVDs from standalone bundles
● Sets environment variables so the emulator tool will look for all files in
the same extracted directory
● Handles finicky emulator launch details
○ e.g. dismissing the lock screen after boot, staggering windows for multiple AVDs
● Can run up to 16 AVDs in parallel
● Takes parameters for screen size, dpi, which port to use, etc
○ But also provides optimal defaults
Dynamic Dependencies
project.dependencies.add(...)
● Emulator bundles are ~200MB
● Adding up API 15-23 -> ~1.6GB
● Devs shouldn’t need to download all API levels to run tests locally
● Custom test config specifies what devices to use for testing
● Gradle plugin dynamically adds dependencies on the right emulator bundle
artifacts
● Gradle cache prevents constant download of the large bundles
Consistent Versioning
● Emulator bundles & Gradle plugin are versioned artifacts
○ So we get all the benefits that versioned artifacts provide!
● Easy to change the creation/launch scripts without fear of breaking things
● When Google releases a new emulator, we can test extensively before
rolling out to app developers
● Bumping the plugin version in the app simultaneously upgrades all devs &
build machines
○ Easy to roll back if there are issues
Results
● 20+ step wiki page -> ./gradlew startEmulator
● Emulators are booted and ready to use in ~30 seconds
● We see the same test failures across dev machines and build servers
● Failure rate due to emulator issues dropped dramatically
● Developers are happy! (for now)

More Related Content

What's hot

Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
Joseph Wang
 
Merge hells!! feature toggles to the rescue
Merge hells!! feature toggles to the rescueMerge hells!! feature toggles to the rescue
Merge hells!! feature toggles to the rescue
Leena N
 
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topic
Gourav Varma
 
Optimize your delivery and quality with the right release methodology and too...
Optimize your delivery and quality with the right release methodology and too...Optimize your delivery and quality with the right release methodology and too...
Optimize your delivery and quality with the right release methodology and too...
DroidConTLV
 
Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...
Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...
Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...
DicodingEvent
 
DevOps Heroes 2019
DevOps Heroes 2019DevOps Heroes 2019
DevOps Heroes 2019
Andrea Tosato
 
Mobile automation using appium.pptx
Mobile automation using appium.pptxMobile automation using appium.pptx
Mobile automation using appium.pptx
Sai Krishna
 
Continuous Development Pipeline
Continuous Development PipelineContinuous Development Pipeline
Continuous Development Pipeline
Izzet Mustafaiev
 
Introduction to DevOps. Continuous Integration by Myroslav Dmytrus
Introduction to DevOps. Continuous Integration by Myroslav Dmytrus Introduction to DevOps. Continuous Integration by Myroslav Dmytrus
Introduction to DevOps. Continuous Integration by Myroslav Dmytrus
Binary Studio
 
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha
 
Robot Framework with actual robot
Robot Framework with actual robot Robot Framework with actual robot
Robot Framework with actual robot
Eficode
 
JaSST'18 Hokkaido Improve Automation Testing
JaSST'18 Hokkaido Improve Automation TestingJaSST'18 Hokkaido Improve Automation Testing
JaSST'18 Hokkaido Improve Automation Testing
Sadaaki Emura
 
Sencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: What's New in Sencha TestSencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: What's New in Sencha Test
Sencha
 
Learn Continuous Integration with Jenkins All in One Guide
Learn Continuous Integration with Jenkins All in One GuideLearn Continuous Integration with Jenkins All in One Guide
Learn Continuous Integration with Jenkins All in One Guide
Sam Dias
 
Mobile Automation with Appium
Mobile Automation with AppiumMobile Automation with Appium
Mobile Automation with Appium
Manoj Kumar Kumar
 
Advanced Appium: SeleniumConf UK 2016
Advanced Appium: SeleniumConf UK 2016Advanced Appium: SeleniumConf UK 2016
Advanced Appium: SeleniumConf UK 2016
Dan Cuellar
 
Continuous deployment steve povilaitis
Continuous deployment   steve povilaitisContinuous deployment   steve povilaitis
Continuous deployment steve povilaitisSteve Povilaitis
 
Robot Framework Introduction & Sauce Labs Integration
Robot Framework Introduction & Sauce Labs IntegrationRobot Framework Introduction & Sauce Labs Integration
Robot Framework Introduction & Sauce Labs Integration
Sauce Labs
 
Kotlin for Android Developer - Make our live easier
Kotlin for Android Developer - Make our live easierKotlin for Android Developer - Make our live easier
Kotlin for Android Developer - Make our live easier
Tai Dang
 
Create React Native App vs Expo vs Manually
Create React Native App vs Expo vs ManuallyCreate React Native App vs Expo vs Manually
Create React Native App vs Expo vs Manually
Eugene Zharkov
 

What's hot (20)

Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
Merge hells!! feature toggles to the rescue
Merge hells!! feature toggles to the rescueMerge hells!! feature toggles to the rescue
Merge hells!! feature toggles to the rescue
 
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topic
 
Optimize your delivery and quality with the right release methodology and too...
Optimize your delivery and quality with the right release methodology and too...Optimize your delivery and quality with the right release methodology and too...
Optimize your delivery and quality with the right release methodology and too...
 
Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...
Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...
Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...
 
DevOps Heroes 2019
DevOps Heroes 2019DevOps Heroes 2019
DevOps Heroes 2019
 
Mobile automation using appium.pptx
Mobile automation using appium.pptxMobile automation using appium.pptx
Mobile automation using appium.pptx
 
Continuous Development Pipeline
Continuous Development PipelineContinuous Development Pipeline
Continuous Development Pipeline
 
Introduction to DevOps. Continuous Integration by Myroslav Dmytrus
Introduction to DevOps. Continuous Integration by Myroslav Dmytrus Introduction to DevOps. Continuous Integration by Myroslav Dmytrus
Introduction to DevOps. Continuous Integration by Myroslav Dmytrus
 
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
 
Robot Framework with actual robot
Robot Framework with actual robot Robot Framework with actual robot
Robot Framework with actual robot
 
JaSST'18 Hokkaido Improve Automation Testing
JaSST'18 Hokkaido Improve Automation TestingJaSST'18 Hokkaido Improve Automation Testing
JaSST'18 Hokkaido Improve Automation Testing
 
Sencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: What's New in Sencha TestSencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: What's New in Sencha Test
 
Learn Continuous Integration with Jenkins All in One Guide
Learn Continuous Integration with Jenkins All in One GuideLearn Continuous Integration with Jenkins All in One Guide
Learn Continuous Integration with Jenkins All in One Guide
 
Mobile Automation with Appium
Mobile Automation with AppiumMobile Automation with Appium
Mobile Automation with Appium
 
Advanced Appium: SeleniumConf UK 2016
Advanced Appium: SeleniumConf UK 2016Advanced Appium: SeleniumConf UK 2016
Advanced Appium: SeleniumConf UK 2016
 
Continuous deployment steve povilaitis
Continuous deployment   steve povilaitisContinuous deployment   steve povilaitis
Continuous deployment steve povilaitis
 
Robot Framework Introduction & Sauce Labs Integration
Robot Framework Introduction & Sauce Labs IntegrationRobot Framework Introduction & Sauce Labs Integration
Robot Framework Introduction & Sauce Labs Integration
 
Kotlin for Android Developer - Make our live easier
Kotlin for Android Developer - Make our live easierKotlin for Android Developer - Make our live easier
Kotlin for Android Developer - Make our live easier
 
Create React Native App vs Expo vs Manually
Create React Native App vs Expo vs ManuallyCreate React Native App vs Expo vs Manually
Create React Native App vs Expo vs Manually
 

Similar to LinkedIn's Consistent Android Testing Environments Using Gradle

3x3 Speeding Up Mobile Releases
3x3 Speeding Up Mobile Releases3x3 Speeding Up Mobile Releases
3x3 Speeding Up Mobile Releases
Mobile Delivery Days
 
Gradle and Your Android Wearable Projects
Gradle and Your Android Wearable ProjectsGradle and Your Android Wearable Projects
Gradle and Your Android Wearable Projects
CommonsWare
 
Appium an introduction
Appium   an introductionAppium   an introduction
Appium an introduction
Vivek Shringi
 
Survival of the Continuist
Survival of the ContinuistSurvival of the Continuist
Survival of the Continuist
Paul Blundell
 
Introduction to Test Automation
Introduction to Test AutomationIntroduction to Test Automation
Introduction to Test Automation
Pekka Klärck
 
Deploy Multinode GitLab Runner in openSUSE 15.1 Instances with Ansible Automa...
Deploy Multinode GitLab Runner in openSUSE 15.1 Instances with Ansible Automa...Deploy Multinode GitLab Runner in openSUSE 15.1 Instances with Ansible Automa...
Deploy Multinode GitLab Runner in openSUSE 15.1 Instances with Ansible Automa...
Samsul Ma'arif
 
Release & Iterate Faster: Stop Manual Testing
Release & Iterate Faster: Stop Manual TestingRelease & Iterate Faster: Stop Manual Testing
Release & Iterate Faster: Stop Manual Testing
Drew Hannay
 
Selenium Camp 2016 - Kiev, Ukraine
Selenium Camp 2016 -  Kiev, UkraineSelenium Camp 2016 -  Kiev, Ukraine
Selenium Camp 2016 - Kiev, Ukraine
Justin Ison
 
Building CI_CD for Mobile Development.pptx
Building CI_CD for Mobile Development.pptxBuilding CI_CD for Mobile Development.pptx
Building CI_CD for Mobile Development.pptx
GurzuInc
 
Web fundamental 4 developers
Web fundamental 4 developersWeb fundamental 4 developers
Web fundamental 4 developers
Ido Green
 
Continuous testing
Continuous testingContinuous testing
Continuous testing
Oleksandr Metelytsia
 
Introducing chrome apps (ogura)
Introducing chrome apps (ogura)Introducing chrome apps (ogura)
Introducing chrome apps (ogura)
Kazuhiro Ogura
 
Cloud Native CI/CD with Spring Cloud Pipelines
Cloud Native CI/CD with Spring Cloud PipelinesCloud Native CI/CD with Spring Cloud Pipelines
Cloud Native CI/CD with Spring Cloud Pipelines
Lars Rosenquist
 
Cloud Native CI/CD with Spring Cloud Pipelines
Cloud Native CI/CD with Spring Cloud PipelinesCloud Native CI/CD with Spring Cloud Pipelines
Cloud Native CI/CD with Spring Cloud Pipelines
Lars Rosenquist
 
Bootify Yyour App from Zero to Hero
Bootify Yyour App from Zero to HeroBootify Yyour App from Zero to Hero
Bootify Yyour App from Zero to Hero
EPAM
 
GeoServer Developers Workshop
GeoServer Developers WorkshopGeoServer Developers Workshop
GeoServer Developers Workshop
Jody Garnett
 
Future of Mobile Automation, Appium Steals it
Future of Mobile Automation, Appium Steals itFuture of Mobile Automation, Appium Steals it
Future of Mobile Automation, Appium Steals it
Srinivasan Sekar
 
Continuously Break The Android
Continuously Break The AndroidContinuously Break The Android
Continuously Break The Android
Hasan Hosgel
 
High Performance Software Engineering Teams
High Performance Software Engineering TeamsHigh Performance Software Engineering Teams
High Performance Software Engineering Teams
Lars Thorup
 
Mobile CICD
Mobile CICD Mobile CICD
Mobile CICD
Gurzu Inc
 

Similar to LinkedIn's Consistent Android Testing Environments Using Gradle (20)

3x3 Speeding Up Mobile Releases
3x3 Speeding Up Mobile Releases3x3 Speeding Up Mobile Releases
3x3 Speeding Up Mobile Releases
 
Gradle and Your Android Wearable Projects
Gradle and Your Android Wearable ProjectsGradle and Your Android Wearable Projects
Gradle and Your Android Wearable Projects
 
Appium an introduction
Appium   an introductionAppium   an introduction
Appium an introduction
 
Survival of the Continuist
Survival of the ContinuistSurvival of the Continuist
Survival of the Continuist
 
Introduction to Test Automation
Introduction to Test AutomationIntroduction to Test Automation
Introduction to Test Automation
 
Deploy Multinode GitLab Runner in openSUSE 15.1 Instances with Ansible Automa...
Deploy Multinode GitLab Runner in openSUSE 15.1 Instances with Ansible Automa...Deploy Multinode GitLab Runner in openSUSE 15.1 Instances with Ansible Automa...
Deploy Multinode GitLab Runner in openSUSE 15.1 Instances with Ansible Automa...
 
Release & Iterate Faster: Stop Manual Testing
Release & Iterate Faster: Stop Manual TestingRelease & Iterate Faster: Stop Manual Testing
Release & Iterate Faster: Stop Manual Testing
 
Selenium Camp 2016 - Kiev, Ukraine
Selenium Camp 2016 -  Kiev, UkraineSelenium Camp 2016 -  Kiev, Ukraine
Selenium Camp 2016 - Kiev, Ukraine
 
Building CI_CD for Mobile Development.pptx
Building CI_CD for Mobile Development.pptxBuilding CI_CD for Mobile Development.pptx
Building CI_CD for Mobile Development.pptx
 
Web fundamental 4 developers
Web fundamental 4 developersWeb fundamental 4 developers
Web fundamental 4 developers
 
Continuous testing
Continuous testingContinuous testing
Continuous testing
 
Introducing chrome apps (ogura)
Introducing chrome apps (ogura)Introducing chrome apps (ogura)
Introducing chrome apps (ogura)
 
Cloud Native CI/CD with Spring Cloud Pipelines
Cloud Native CI/CD with Spring Cloud PipelinesCloud Native CI/CD with Spring Cloud Pipelines
Cloud Native CI/CD with Spring Cloud Pipelines
 
Cloud Native CI/CD with Spring Cloud Pipelines
Cloud Native CI/CD with Spring Cloud PipelinesCloud Native CI/CD with Spring Cloud Pipelines
Cloud Native CI/CD with Spring Cloud Pipelines
 
Bootify Yyour App from Zero to Hero
Bootify Yyour App from Zero to HeroBootify Yyour App from Zero to Hero
Bootify Yyour App from Zero to Hero
 
GeoServer Developers Workshop
GeoServer Developers WorkshopGeoServer Developers Workshop
GeoServer Developers Workshop
 
Future of Mobile Automation, Appium Steals it
Future of Mobile Automation, Appium Steals itFuture of Mobile Automation, Appium Steals it
Future of Mobile Automation, Appium Steals it
 
Continuously Break The Android
Continuously Break The AndroidContinuously Break The Android
Continuously Break The Android
 
High Performance Software Engineering Teams
High Performance Software Engineering TeamsHigh Performance Software Engineering Teams
High Performance Software Engineering Teams
 
Mobile CICD
Mobile CICD Mobile CICD
Mobile CICD
 

Recently uploaded

Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
gestioneergodomus
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
BrazilAccount1
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
top1002
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
ChristineTorrepenida1
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 

Recently uploaded (20)

Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 

LinkedIn's Consistent Android Testing Environments Using Gradle

  • 1. Consistent Android testing environments using Gradle Drew Hannay (@drewhannay)
  • 2. Project Voyager ● Recently released LinkedIn app rewrite ● 140+ committers ● 50+ regular committers ● ~1 year of development
  • 3. 3x3 ● 3 releases per day ● No more than 3 hours from commit to publish ● Heavy focus on automation to increase confidence in releases ● Needs to be FAST - but also reliable ● Big investment in Espresso and Android Testing Support Library
  • 4. UI Testing is Hard ● Android Emulator, Genymotion, physical devices ● Practically infinite number of screen sizes ● Different configs; RAM, heap size, hardware features… ● Tests passed locally, but failed on the build server or other dev machines ● Developers were unhappy
  • 5. Enter Gradle ● Script to start emulators was deployed to each build machine ● Creating a new emulator from scratch every time = SLOW ● Only capable of starting a single emulator at a time ● Already using Gradle to get consistent builds across machines ● Why should tests be different?
  • 8. Emulator Skins Skin No Skin sdk/platforms/android-21/ skins/{skin-name}/ hardware.ini layout {control-name}.png
  • 9. emulator-bundle.tar.gz {user data files} system/ {system files} ● Gradle project that outputs these bundles as artifacts ● Download fresh system images from Google ● Creates sdcard img (since many tests depend on this existing!) ● Start the AVD once to cause user files to be created ● Bundle system + user files into a tar artifact Standalone bundles
  • 10. Custom Gradle Plugin apply plugin: 'com.linkedin.android-emulators' ● Tasks for extracting and starting AVDs from standalone bundles ● Sets environment variables so the emulator tool will look for all files in the same extracted directory ● Handles finicky emulator launch details ○ e.g. dismissing the lock screen after boot, staggering windows for multiple AVDs ● Can run up to 16 AVDs in parallel ● Takes parameters for screen size, dpi, which port to use, etc ○ But also provides optimal defaults
  • 11. Dynamic Dependencies project.dependencies.add(...) ● Emulator bundles are ~200MB ● Adding up API 15-23 -> ~1.6GB ● Devs shouldn’t need to download all API levels to run tests locally ● Custom test config specifies what devices to use for testing ● Gradle plugin dynamically adds dependencies on the right emulator bundle artifacts ● Gradle cache prevents constant download of the large bundles
  • 12. Consistent Versioning ● Emulator bundles & Gradle plugin are versioned artifacts ○ So we get all the benefits that versioned artifacts provide! ● Easy to change the creation/launch scripts without fear of breaking things ● When Google releases a new emulator, we can test extensively before rolling out to app developers ● Bumping the plugin version in the app simultaneously upgrades all devs & build machines ○ Easy to roll back if there are issues
  • 13. Results ● 20+ step wiki page -> ./gradlew startEmulator ● Emulators are booted and ready to use in ~30 seconds ● We see the same test failures across dev machines and build servers ● Failure rate due to emulator issues dropped dramatically ● Developers are happy! (for now)