SlideShare une entreprise Scribd logo
1  sur  36
Télécharger pour lire hors ligne
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
Using Espresso
for Fast and Reliable Feedback
Embedding quality across the Android lifecycle
Web: perfectomobile.com Twitter: @perfectomobile
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
● Session is being recorded
● Email once presentation is posted
● Questions and conversation
○ Twitter: #justletmecode
○ WebEx chat panel
○ Q&A at the end of the webinar
Housekeeping
Paul Bruce
Developer Advocate
Perfecto
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
What We’ll Cover
1. Introductions to Espresso testing framework
○ The pattern and some code samples
○ Comparing Espresso and Appium
2. Improving build verification in CI
○ Testing types and schedules
○ Espresso on real devices in Jenkins
3. Pros & Cons of DIY lab setup
○ Common pitfalls and requirements for success
4. Accelerating the feedback loop
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
Poll: Which UI testing technologies do you use?
● Espresso
● Appium
● Robotium
● UI Automator
● Other
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
Introductions to the Espresso test framework
I
Using Espresso for Fast and Reliable Feedback
Embedding quality across the Android lifecycle
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
Automated UI Testing for Android apps
● Creates folder for tests (androidTests)
● Adds Espresso libraries as dependencies
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
On the surface, a fluent UI testing pattern
onData(ObjectMatcher)
.DataOptions
.perform(ViewAction)
.check(ViewAssertion)
Find It
Act on It
Check It
onView(Matcher)
.perform(ViewAction)
.check(ViewAssertion)
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
Espresso syntax in a nutshell
Find
onView(withId(R.id.bill_value))
onView(allOf(
withId(R.id.bill_value),
isDisplayed()
))
// see ViewMatchers.
Act
.perform(replaceText(“25.44”))
.perform(
click(),
typeText(“...”)
)
.perform(pressBackButton())
.perform(swipeUp())
// see ViewActions.
Check
.check(matches(isDisplayed()))
.check(matches(
not(isDisplayed())
))
.check(doesNotExist())
.check(matches(withText(“...”)))
// see ViewAssertions.
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
Espresso in Android Studio
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
How ADB and
instrumentation
work together
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
How does the alternative (Appium) work?
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
Pros/cons on both sides
Espresso/XCTest WebDriver...
Instrumented Black-box
Code+ XPath+
Ecosystem IndependentUpgrades
Execution
Object Locators
N YCross-platform
Depends+ Depends-Stability
bit.ly/oss-test-choices
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
Espresso avoids sleep() creep
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
Espresso avoids XPath delta breakage
Strings tell your compiler NOTHING!!!
No refactoring support
Can you write them properly...yes! Do you?
None of these things apply to compilable statements (i.e. R…).
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
More Espresso getting started resources:
● Intro to Espresso and Spoon
bit.ly/2kN4DAZ
● Vogella - Espresso Tutorial
bit.ly/2l0y6lY
● Watch everything from Chiu Ki Chan on YouTube
● Tweet / email me with questions! @paulsbruce me@paulsbruce.io
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
Improving build verification in CI
2
Using Espresso for Fast and Reliable Feedback
Embedding quality across the Android lifecycle
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
Feedback loops across the pipeline
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
Complete feedback at the right times
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
Local Build Commit → Build Full / Nightly
Unit / New UI Integration / Smoke Full Regression
Fake Real Real
Static Mocks SandboxAPI
Tests
Hardware
A simple recipe for fast and complete feedback
< 2min < 20min < 2hr
Espresso in Jenkins
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
Pros & cons of DIY lab setup
3
Using Espresso for Fast and Reliable Feedback
Embedding quality across the Android lifecycle
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
Devices: local or cloud?
Local Build Merge → Build Full / Nightly
✓ ! ✘
! ✘ ✘
✓ ✓ ✓Cloud Lab
Emulator
Local Lab
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
Less hunting, more coding
● How many devices per developer?
● In sync with the market?
● Spares, adapters?
● Storage/hosting/power costs?
● Monitoring?
● Security?
● High-volume automated testing
● Big data from CI
● Results retention & collaboration
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
Complete quality across the entire lifecycle
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
Accelerating the feedback loop
4
Using Espresso for Fast and Reliable Feedback
Embedding quality across the Android lifecycle
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
Build verification, smoke tests
x5 per day * 4 critical
platforms
Regression &
end-to-end testing
nightly * 16 platforms +
conditions
fast & complete feedback
Parallel testing requires a reliable, scalable lab
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
Fast feedback means a lab that fits into your workflow
bit.ly/perfecto-slack
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
A complete view of build quality
Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
What We’ve Covered Today
1. Introductions to Espresso testing framework
○ The pattern and some code samples
○ Comparing Espresso and Appium
2. Improving build verification in CI
○ Testing types and schedules
○ Espresso on real devices in Jenkins
3. Pros & Cons of DIY lab setup
○ Common pitfalls and requirements for success
4. Accelerating the feedback loop
4 Ways to Speed Up Your Mobile/Web App Daily Grind Web: perfectomobile.com Twitter: @perfectomobile
Q&A
.

Contenu connexe

En vedette

Selenium Automation Like You’ve Never Seen!
Selenium Automation Like You’ve Never Seen!Selenium Automation Like You’ve Never Seen!
Selenium Automation Like You’ve Never Seen!Perfecto by Perforce
 
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium MeetupSelenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium MeetupDave Haeffner
 
The wild wild west of Selenium Capabilities
The wild wild west of Selenium CapabilitiesThe wild wild west of Selenium Capabilities
The wild wild west of Selenium CapabilitiesAdi Ofri
 
DevOps Best Practices: Managing and Scaling Release Automation Using Visual a...
DevOps Best Practices: Managing and Scaling Release Automation Using Visual a...DevOps Best Practices: Managing and Scaling Release Automation Using Visual a...
DevOps Best Practices: Managing and Scaling Release Automation Using Visual a...XebiaLabs
 
Selenium and Open Source Advanced Testing
Selenium and Open Source Advanced TestingSelenium and Open Source Advanced Testing
Selenium and Open Source Advanced TestingAustin Marie Gay
 
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...COMAQA.BY
 
MonkeyTalk Automation Testing For Android Application
MonkeyTalk Automation Testing For Android ApplicationMonkeyTalk Automation Testing For Android Application
MonkeyTalk Automation Testing For Android ApplicationContusQA
 
Fullstack End-to-end test automation with Node.js, one year later
Fullstack End-to-end test automation with Node.js, one year laterFullstack End-to-end test automation with Node.js, one year later
Fullstack End-to-end test automation with Node.js, one year laterMek Srunyu Stittri
 
Node.js and Selenium Webdriver, a journey from the Java side
Node.js and Selenium Webdriver, a journey from the Java sideNode.js and Selenium Webdriver, a journey from the Java side
Node.js and Selenium Webdriver, a journey from the Java sideMek Srunyu Stittri
 
Android Automation Testing with Selendroid
Android Automation Testing with SelendroidAndroid Automation Testing with Selendroid
Android Automation Testing with SelendroidVikas Thange
 
Monitoring CDN Performance
Monitoring CDN PerformanceMonitoring CDN Performance
Monitoring CDN PerformanceThousandEyes
 
NGINX Microservices Reference Architecture: Ask Me Anything
NGINX Microservices Reference Architecture: Ask Me AnythingNGINX Microservices Reference Architecture: Ask Me Anything
NGINX Microservices Reference Architecture: Ask Me AnythingNGINX, Inc.
 
Selenium Tips & Tricks
Selenium Tips & TricksSelenium Tips & Tricks
Selenium Tips & TricksDave Haeffner
 
What if you could eliminate the hidden costs of development?
What if you could eliminate the hidden costs of development?What if you could eliminate the hidden costs of development?
What if you could eliminate the hidden costs of development?Rogue Wave Software
 
20170302 tryswift tasting_tests
20170302 tryswift tasting_tests20170302 tryswift tasting_tests
20170302 tryswift tasting_testsKazuaki Matsuo
 
CircleCI and XebiaLabs: A Winning Combination for Seamless, Scalable Continuo...
CircleCI and XebiaLabs: A Winning Combination for Seamless, Scalable Continuo...CircleCI and XebiaLabs: A Winning Combination for Seamless, Scalable Continuo...
CircleCI and XebiaLabs: A Winning Combination for Seamless, Scalable Continuo...XebiaLabs
 
Appium: Prime Cuts
Appium: Prime CutsAppium: Prime Cuts
Appium: Prime CutsSauce Labs
 
A Complete Guide to Testing Responsive Websites
A Complete Guide to Testing Responsive WebsitesA Complete Guide to Testing Responsive Websites
A Complete Guide to Testing Responsive WebsitesPerfecto by Perforce
 

En vedette (18)

Selenium Automation Like You’ve Never Seen!
Selenium Automation Like You’ve Never Seen!Selenium Automation Like You’ve Never Seen!
Selenium Automation Like You’ve Never Seen!
 
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium MeetupSelenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
 
The wild wild west of Selenium Capabilities
The wild wild west of Selenium CapabilitiesThe wild wild west of Selenium Capabilities
The wild wild west of Selenium Capabilities
 
DevOps Best Practices: Managing and Scaling Release Automation Using Visual a...
DevOps Best Practices: Managing and Scaling Release Automation Using Visual a...DevOps Best Practices: Managing and Scaling Release Automation Using Visual a...
DevOps Best Practices: Managing and Scaling Release Automation Using Visual a...
 
Selenium and Open Source Advanced Testing
Selenium and Open Source Advanced TestingSelenium and Open Source Advanced Testing
Selenium and Open Source Advanced Testing
 
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
 
MonkeyTalk Automation Testing For Android Application
MonkeyTalk Automation Testing For Android ApplicationMonkeyTalk Automation Testing For Android Application
MonkeyTalk Automation Testing For Android Application
 
Fullstack End-to-end test automation with Node.js, one year later
Fullstack End-to-end test automation with Node.js, one year laterFullstack End-to-end test automation with Node.js, one year later
Fullstack End-to-end test automation with Node.js, one year later
 
Node.js and Selenium Webdriver, a journey from the Java side
Node.js and Selenium Webdriver, a journey from the Java sideNode.js and Selenium Webdriver, a journey from the Java side
Node.js and Selenium Webdriver, a journey from the Java side
 
Android Automation Testing with Selendroid
Android Automation Testing with SelendroidAndroid Automation Testing with Selendroid
Android Automation Testing with Selendroid
 
Monitoring CDN Performance
Monitoring CDN PerformanceMonitoring CDN Performance
Monitoring CDN Performance
 
NGINX Microservices Reference Architecture: Ask Me Anything
NGINX Microservices Reference Architecture: Ask Me AnythingNGINX Microservices Reference Architecture: Ask Me Anything
NGINX Microservices Reference Architecture: Ask Me Anything
 
Selenium Tips & Tricks
Selenium Tips & TricksSelenium Tips & Tricks
Selenium Tips & Tricks
 
What if you could eliminate the hidden costs of development?
What if you could eliminate the hidden costs of development?What if you could eliminate the hidden costs of development?
What if you could eliminate the hidden costs of development?
 
20170302 tryswift tasting_tests
20170302 tryswift tasting_tests20170302 tryswift tasting_tests
20170302 tryswift tasting_tests
 
CircleCI and XebiaLabs: A Winning Combination for Seamless, Scalable Continuo...
CircleCI and XebiaLabs: A Winning Combination for Seamless, Scalable Continuo...CircleCI and XebiaLabs: A Winning Combination for Seamless, Scalable Continuo...
CircleCI and XebiaLabs: A Winning Combination for Seamless, Scalable Continuo...
 
Appium: Prime Cuts
Appium: Prime CutsAppium: Prime Cuts
Appium: Prime Cuts
 
A Complete Guide to Testing Responsive Websites
A Complete Guide to Testing Responsive WebsitesA Complete Guide to Testing Responsive Websites
A Complete Guide to Testing Responsive Websites
 

Plus de Perfecto by Perforce

Is BDD Worth It? Considerations for Advanced Test Automation
Is BDD Worth It? Considerations for Advanced Test AutomationIs BDD Worth It? Considerations for Advanced Test Automation
Is BDD Worth It? Considerations for Advanced Test AutomationPerfecto by Perforce
 
Yoda debunks the top 5 challenges of continuous testing in the cloud
Yoda debunks the top 5 challenges of continuous testing in the cloudYoda debunks the top 5 challenges of continuous testing in the cloud
Yoda debunks the top 5 challenges of continuous testing in the cloudPerfecto by Perforce
 
5 Mobile App Trends & What They Mean for Dev & Testing
5 Mobile App Trends & What They Mean for Dev & Testing5 Mobile App Trends & What They Mean for Dev & Testing
5 Mobile App Trends & What They Mean for Dev & TestingPerfecto by Perforce
 
How to Scale Digital App Testing With Jenkins & Automation You Can Trust
How to Scale Digital App Testing With Jenkins & Automation You Can TrustHow to Scale Digital App Testing With Jenkins & Automation You Can Trust
How to Scale Digital App Testing With Jenkins & Automation You Can TrustPerfecto by Perforce
 
Mastering Cross-Browser Test Automation With Cypress and Selenium
Mastering Cross-Browser Test Automation With Cypress and SeleniumMastering Cross-Browser Test Automation With Cypress and Selenium
Mastering Cross-Browser Test Automation With Cypress and SeleniumPerfecto by Perforce
 
Cloud Testing Has Never Been Easier or More Accessible
Cloud Testing Has Never Been Easier or More AccessibleCloud Testing Has Never Been Easier or More Accessible
Cloud Testing Has Never Been Easier or More AccessiblePerfecto by Perforce
 
Cognitive Engineering - Shifting Right with Gated.AI Testing - DevOps Next
Cognitive Engineering - Shifting Right with Gated.AI Testing - DevOps NextCognitive Engineering - Shifting Right with Gated.AI Testing - DevOps Next
Cognitive Engineering - Shifting Right with Gated.AI Testing - DevOps NextPerfecto by Perforce
 
The Rise and Benefits of Robotic Process Automation (RPA) - DevOps Next
The Rise and Benefits of Robotic Process Automation (RPA) - DevOps NextThe Rise and Benefits of Robotic Process Automation (RPA) - DevOps Next
The Rise and Benefits of Robotic Process Automation (RPA) - DevOps NextPerfecto by Perforce
 
The New Categories of Software Defects in the Era of AI and ML - DevOps Next
The New Categories of Software Defects in the Era of AI and ML - DevOps NextThe New Categories of Software Defects in the Era of AI and ML - DevOps Next
The New Categories of Software Defects in the Era of AI and ML - DevOps NextPerfecto by Perforce
 
Moving to Modern DevOps with Fuzzing and ML - DevOps Next
Moving to Modern DevOps with Fuzzing and ML - DevOps NextMoving to Modern DevOps with Fuzzing and ML - DevOps Next
Moving to Modern DevOps with Fuzzing and ML - DevOps NextPerfecto by Perforce
 
Leveraging AI and ML in Test Management Systems - DevOps Next
Leveraging AI and ML in Test Management Systems - DevOps NextLeveraging AI and ML in Test Management Systems - DevOps Next
Leveraging AI and ML in Test Management Systems - DevOps NextPerfecto by Perforce
 
How Does AIOps Benefit DevOps Pipeline and Software Quality? - DevOps Next
How Does AIOps Benefit DevOps Pipeline and Software Quality? - DevOps NextHow Does AIOps Benefit DevOps Pipeline and Software Quality? - DevOps Next
How Does AIOps Benefit DevOps Pipeline and Software Quality? - DevOps NextPerfecto by Perforce
 
Classification of Advanced AI and ML Testing Tools - DevOps Next
Classification of Advanced AI and ML Testing Tools - DevOps NextClassification of Advanced AI and ML Testing Tools - DevOps Next
Classification of Advanced AI and ML Testing Tools - DevOps NextPerfecto by Perforce
 
Automated Code Reviews with AI and ML - DevOps Next
Automated Code Reviews with AI and ML - DevOps NextAutomated Code Reviews with AI and ML - DevOps Next
Automated Code Reviews with AI and ML - DevOps NextPerfecto by Perforce
 
Advancing the State of The Art in AI and Testing - DevOps Next
Advancing the State of The Art in AI and Testing - DevOps NextAdvancing the State of The Art in AI and Testing - DevOps Next
Advancing the State of The Art in AI and Testing - DevOps NextPerfecto by Perforce
 
How to Prepare Your Apps for iOS 14 - Test Strategy, Coverage, & Best Practices
How to Prepare Your Apps for iOS 14 - Test Strategy, Coverage, & Best PracticesHow to Prepare Your Apps for iOS 14 - Test Strategy, Coverage, & Best Practices
How to Prepare Your Apps for iOS 14 - Test Strategy, Coverage, & Best PracticesPerfecto by Perforce
 
How to Create a Risk Based Testing Strategy With Simulators, Emulators, and R...
How to Create a Risk Based Testing Strategy With Simulators, Emulators, and R...How to Create a Risk Based Testing Strategy With Simulators, Emulators, and R...
How to Create a Risk Based Testing Strategy With Simulators, Emulators, and R...Perfecto by Perforce
 
Fast Data, Fast Delivery: How Smart Analysis Accelerates App Testing
Fast Data, Fast Delivery: How Smart Analysis Accelerates App TestingFast Data, Fast Delivery: How Smart Analysis Accelerates App Testing
Fast Data, Fast Delivery: How Smart Analysis Accelerates App TestingPerfecto by Perforce
 
Best Practices for Shifting Left Performance and Accessibility Testing
Best Practices for Shifting Left Performance and Accessibility TestingBest Practices for Shifting Left Performance and Accessibility Testing
Best Practices for Shifting Left Performance and Accessibility TestingPerfecto by Perforce
 
Deliver Flawless Mobile Apps Faster with CI/CD & CT
Deliver Flawless Mobile Apps Faster with CI/CD & CTDeliver Flawless Mobile Apps Faster with CI/CD & CT
Deliver Flawless Mobile Apps Faster with CI/CD & CTPerfecto by Perforce
 

Plus de Perfecto by Perforce (20)

Is BDD Worth It? Considerations for Advanced Test Automation
Is BDD Worth It? Considerations for Advanced Test AutomationIs BDD Worth It? Considerations for Advanced Test Automation
Is BDD Worth It? Considerations for Advanced Test Automation
 
Yoda debunks the top 5 challenges of continuous testing in the cloud
Yoda debunks the top 5 challenges of continuous testing in the cloudYoda debunks the top 5 challenges of continuous testing in the cloud
Yoda debunks the top 5 challenges of continuous testing in the cloud
 
5 Mobile App Trends & What They Mean for Dev & Testing
5 Mobile App Trends & What They Mean for Dev & Testing5 Mobile App Trends & What They Mean for Dev & Testing
5 Mobile App Trends & What They Mean for Dev & Testing
 
How to Scale Digital App Testing With Jenkins & Automation You Can Trust
How to Scale Digital App Testing With Jenkins & Automation You Can TrustHow to Scale Digital App Testing With Jenkins & Automation You Can Trust
How to Scale Digital App Testing With Jenkins & Automation You Can Trust
 
Mastering Cross-Browser Test Automation With Cypress and Selenium
Mastering Cross-Browser Test Automation With Cypress and SeleniumMastering Cross-Browser Test Automation With Cypress and Selenium
Mastering Cross-Browser Test Automation With Cypress and Selenium
 
Cloud Testing Has Never Been Easier or More Accessible
Cloud Testing Has Never Been Easier or More AccessibleCloud Testing Has Never Been Easier or More Accessible
Cloud Testing Has Never Been Easier or More Accessible
 
Cognitive Engineering - Shifting Right with Gated.AI Testing - DevOps Next
Cognitive Engineering - Shifting Right with Gated.AI Testing - DevOps NextCognitive Engineering - Shifting Right with Gated.AI Testing - DevOps Next
Cognitive Engineering - Shifting Right with Gated.AI Testing - DevOps Next
 
The Rise and Benefits of Robotic Process Automation (RPA) - DevOps Next
The Rise and Benefits of Robotic Process Automation (RPA) - DevOps NextThe Rise and Benefits of Robotic Process Automation (RPA) - DevOps Next
The Rise and Benefits of Robotic Process Automation (RPA) - DevOps Next
 
The New Categories of Software Defects in the Era of AI and ML - DevOps Next
The New Categories of Software Defects in the Era of AI and ML - DevOps NextThe New Categories of Software Defects in the Era of AI and ML - DevOps Next
The New Categories of Software Defects in the Era of AI and ML - DevOps Next
 
Moving to Modern DevOps with Fuzzing and ML - DevOps Next
Moving to Modern DevOps with Fuzzing and ML - DevOps NextMoving to Modern DevOps with Fuzzing and ML - DevOps Next
Moving to Modern DevOps with Fuzzing and ML - DevOps Next
 
Leveraging AI and ML in Test Management Systems - DevOps Next
Leveraging AI and ML in Test Management Systems - DevOps NextLeveraging AI and ML in Test Management Systems - DevOps Next
Leveraging AI and ML in Test Management Systems - DevOps Next
 
How Does AIOps Benefit DevOps Pipeline and Software Quality? - DevOps Next
How Does AIOps Benefit DevOps Pipeline and Software Quality? - DevOps NextHow Does AIOps Benefit DevOps Pipeline and Software Quality? - DevOps Next
How Does AIOps Benefit DevOps Pipeline and Software Quality? - DevOps Next
 
Classification of Advanced AI and ML Testing Tools - DevOps Next
Classification of Advanced AI and ML Testing Tools - DevOps NextClassification of Advanced AI and ML Testing Tools - DevOps Next
Classification of Advanced AI and ML Testing Tools - DevOps Next
 
Automated Code Reviews with AI and ML - DevOps Next
Automated Code Reviews with AI and ML - DevOps NextAutomated Code Reviews with AI and ML - DevOps Next
Automated Code Reviews with AI and ML - DevOps Next
 
Advancing the State of The Art in AI and Testing - DevOps Next
Advancing the State of The Art in AI and Testing - DevOps NextAdvancing the State of The Art in AI and Testing - DevOps Next
Advancing the State of The Art in AI and Testing - DevOps Next
 
How to Prepare Your Apps for iOS 14 - Test Strategy, Coverage, & Best Practices
How to Prepare Your Apps for iOS 14 - Test Strategy, Coverage, & Best PracticesHow to Prepare Your Apps for iOS 14 - Test Strategy, Coverage, & Best Practices
How to Prepare Your Apps for iOS 14 - Test Strategy, Coverage, & Best Practices
 
How to Create a Risk Based Testing Strategy With Simulators, Emulators, and R...
How to Create a Risk Based Testing Strategy With Simulators, Emulators, and R...How to Create a Risk Based Testing Strategy With Simulators, Emulators, and R...
How to Create a Risk Based Testing Strategy With Simulators, Emulators, and R...
 
Fast Data, Fast Delivery: How Smart Analysis Accelerates App Testing
Fast Data, Fast Delivery: How Smart Analysis Accelerates App TestingFast Data, Fast Delivery: How Smart Analysis Accelerates App Testing
Fast Data, Fast Delivery: How Smart Analysis Accelerates App Testing
 
Best Practices for Shifting Left Performance and Accessibility Testing
Best Practices for Shifting Left Performance and Accessibility TestingBest Practices for Shifting Left Performance and Accessibility Testing
Best Practices for Shifting Left Performance and Accessibility Testing
 
Deliver Flawless Mobile Apps Faster with CI/CD & CT
Deliver Flawless Mobile Apps Faster with CI/CD & CTDeliver Flawless Mobile Apps Faster with CI/CD & CT
Deliver Flawless Mobile Apps Faster with CI/CD & CT
 

Dernier

Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPowerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPsychicRuben LoveSpells
 
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRFULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRnishacall1
 
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceanilsa9823
 
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceCALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceanilsa9823
 
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceDelhi Call girls
 
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Pooja Nehwal
 
9892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x79892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x7Pooja Nehwal
 

Dernier (7)

Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPowerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
 
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRFULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
 
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
 
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceCALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
 
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
 
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
 
9892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x79892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x7
 

Using Espresso for Fast and Reliable Feedback

  • 1. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile Using Espresso for Fast and Reliable Feedback Embedding quality across the Android lifecycle Web: perfectomobile.com Twitter: @perfectomobile
  • 2. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile ● Session is being recorded ● Email once presentation is posted ● Questions and conversation ○ Twitter: #justletmecode ○ WebEx chat panel ○ Q&A at the end of the webinar Housekeeping
  • 4. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile What We’ll Cover 1. Introductions to Espresso testing framework ○ The pattern and some code samples ○ Comparing Espresso and Appium 2. Improving build verification in CI ○ Testing types and schedules ○ Espresso on real devices in Jenkins 3. Pros & Cons of DIY lab setup ○ Common pitfalls and requirements for success 4. Accelerating the feedback loop
  • 5. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile Poll: Which UI testing technologies do you use? ● Espresso ● Appium ● Robotium ● UI Automator ● Other
  • 6. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile Introductions to the Espresso test framework I Using Espresso for Fast and Reliable Feedback Embedding quality across the Android lifecycle
  • 7. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile Automated UI Testing for Android apps ● Creates folder for tests (androidTests) ● Adds Espresso libraries as dependencies
  • 8. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile On the surface, a fluent UI testing pattern onData(ObjectMatcher) .DataOptions .perform(ViewAction) .check(ViewAssertion) Find It Act on It Check It onView(Matcher) .perform(ViewAction) .check(ViewAssertion)
  • 9. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile Espresso syntax in a nutshell Find onView(withId(R.id.bill_value)) onView(allOf( withId(R.id.bill_value), isDisplayed() )) // see ViewMatchers. Act .perform(replaceText(“25.44”)) .perform( click(), typeText(“...”) ) .perform(pressBackButton()) .perform(swipeUp()) // see ViewActions. Check .check(matches(isDisplayed())) .check(matches( not(isDisplayed()) )) .check(doesNotExist()) .check(matches(withText(“...”))) // see ViewAssertions.
  • 10. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile Espresso in Android Studio
  • 11. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile How ADB and instrumentation work together
  • 12. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile How does the alternative (Appium) work?
  • 13. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile Pros/cons on both sides Espresso/XCTest WebDriver... Instrumented Black-box Code+ XPath+ Ecosystem IndependentUpgrades Execution Object Locators N YCross-platform Depends+ Depends-Stability bit.ly/oss-test-choices
  • 14. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile Espresso avoids sleep() creep
  • 15. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile Espresso avoids XPath delta breakage Strings tell your compiler NOTHING!!! No refactoring support Can you write them properly...yes! Do you? None of these things apply to compilable statements (i.e. R…).
  • 16. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile More Espresso getting started resources: ● Intro to Espresso and Spoon bit.ly/2kN4DAZ ● Vogella - Espresso Tutorial bit.ly/2l0y6lY ● Watch everything from Chiu Ki Chan on YouTube ● Tweet / email me with questions! @paulsbruce me@paulsbruce.io
  • 17. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile Improving build verification in CI 2 Using Espresso for Fast and Reliable Feedback Embedding quality across the Android lifecycle
  • 18. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile Feedback loops across the pipeline
  • 19. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile Complete feedback at the right times
  • 20. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile Local Build Commit → Build Full / Nightly Unit / New UI Integration / Smoke Full Regression Fake Real Real Static Mocks SandboxAPI Tests Hardware A simple recipe for fast and complete feedback < 2min < 20min < 2hr
  • 22. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile Pros & cons of DIY lab setup 3 Using Espresso for Fast and Reliable Feedback Embedding quality across the Android lifecycle
  • 23. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile Devices: local or cloud? Local Build Merge → Build Full / Nightly ✓ ! ✘ ! ✘ ✘ ✓ ✓ ✓Cloud Lab Emulator Local Lab
  • 24. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile Less hunting, more coding ● How many devices per developer? ● In sync with the market? ● Spares, adapters? ● Storage/hosting/power costs? ● Monitoring? ● Security? ● High-volume automated testing ● Big data from CI ● Results retention & collaboration
  • 25. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
  • 26. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
  • 27. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile Complete quality across the entire lifecycle
  • 28. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile Accelerating the feedback loop 4 Using Espresso for Fast and Reliable Feedback Embedding quality across the Android lifecycle
  • 29. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile Build verification, smoke tests x5 per day * 4 critical platforms Regression & end-to-end testing nightly * 16 platforms + conditions fast & complete feedback Parallel testing requires a reliable, scalable lab
  • 30. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile Fast feedback means a lab that fits into your workflow bit.ly/perfecto-slack
  • 31. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
  • 32. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
  • 33. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile
  • 34. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile A complete view of build quality
  • 35. Using Espresso for Fast and Reliable Feedback Web: perfectomobile.com Twitter: @perfectomobile What We’ve Covered Today 1. Introductions to Espresso testing framework ○ The pattern and some code samples ○ Comparing Espresso and Appium 2. Improving build verification in CI ○ Testing types and schedules ○ Espresso on real devices in Jenkins 3. Pros & Cons of DIY lab setup ○ Common pitfalls and requirements for success 4. Accelerating the feedback loop
  • 36. 4 Ways to Speed Up Your Mobile/Web App Daily Grind Web: perfectomobile.com Twitter: @perfectomobile Q&A .