SlideShare a Scribd company logo
11
Most read
12
Most read
14
Most read
Espresso
Espresso
By:
Deepika,
Nikhil &
Rohit
What is
Espresso?
Automated UI Testing
• What’s Espresso
• Similar Frameworks for Automation
• Why Expresso?
• Advantages of Espresso
• Set-Up
• Hands-on with API discussion
• API cheat sheet
Agenda...
• A testing framework for Android to make it easy to write reliable UI
tests for a single application
• Developed internally at Google and open sourced in 2013
• Espresso 2.0 released in December 2015 and part of the Android
Support Repository.
Espresso
● Robotium
● Appium
● Calabash
● Selendroid
Similar Frameworks for Automation
Why ? and Benefits
Problems Faced during automation?
Testing framework is complex!
Tests are flaky!
Tests are slow and lasts hours!
Not easy to write tests!
Why ? and Benefits(contd.)
- Easy
- Fast and Reliable
- Backward Compatibility(Froyo is there)
- Automatic Synchronization
- Supports testing activities outside apps
- Test Coverage
HOW ??
Dude
It’s
easy !!
Dude, I
can’t
see !!
Writing Espresso Tests
Espresso tests are based on a formula:-
onView(ViewMatcher)
.perform(ViewAction)
.check(ViewAssertion);
Revealing The Formula !!
Find
Something
Do
Something
Check
Something
onView(withId(R.id.add_expense)) //ViewMatcher
.perform(click()) // ViewAction
.check(matches(withText("Add Expense"))); //Assertion
Example
• Android Studio with Android SDK
• Gradle
• Espresso
• Repo : git clone https://github.com/ajitsing/ExpenseManager
Setup- Tools
Setup- Espresso with Gradle
• Simple test
First Test
• Workflow Test
Second Test
Entry point to interactions with views is via :-
• onView(Matcher<View>)
• onData(Matcher<? extends Object>)
ViewMatcher - allows you to locate a view in the current view hierarchy
Matcher:
• withId()
• withText()
• isDisplayed()
• withParent()
• etc
ViewMatcher
Matches on User Properties
Matches on UI properties
Matches on with Hierarchy
ViewActions - allows you to interact with views
• perform(ViewAction… viewActions)
ViewAction:
• click()
• doubleClick()
• longClick()
• scrollTo()
• swipeLeft()
• clearText()
• typeText()
• etc
ViewActions
Click/Press Action
Gestures
Text centric
Actions
ViewAssertions – allows you to assert the state of a view.
• checks(ViewAssertion viewAssert)
ViewAssertion:
• matches(Matcher)
• doesNotExist()
ViewAssertions
API Cheatsheet
Espresso testing
Espresso testing

More Related Content

PDF
Unit Testing vs Integration Testing
PPTX
Moq Presentation
PPTX
Unit tests & TDD
PPTX
Laravel Unit Testing
PDF
Unit testing best practices
PPTX
Understanding Unit Testing
PPTX
Sanity testing and smoke testing
PPTX
Test automation proposal
Unit Testing vs Integration Testing
Moq Presentation
Unit tests & TDD
Laravel Unit Testing
Unit testing best practices
Understanding Unit Testing
Sanity testing and smoke testing
Test automation proposal

What's hot (20)

PDF
Espresso
PPTX
Testing android apps with espresso
PDF
Android UI Testing with Espresso
PPTX
Appium ppt
PDF
Appium basics
PPTX
Automation using Appium
PDF
Mobile Test Automation - Appium
PPTX
Appium overview
PDF
Appium: Automation for Mobile Apps
PPTX
Test Automation Framework with BDD and Cucumber
PPTX
Automation With Appium
PPTX
Cucumber BDD
PPTX
Appium Presentation
PDF
Developing Faster with Swagger
PPTX
Colorful world-of-visual-automation-testing-latest
PPT
PDF
Intro to Visual Test Automation with Applitools Eyes
PDF
Getting started with appium
PPTX
Automation testing on ios platform using appium
PPTX
Swagger - make your API accessible
Espresso
Testing android apps with espresso
Android UI Testing with Espresso
Appium ppt
Appium basics
Automation using Appium
Mobile Test Automation - Appium
Appium overview
Appium: Automation for Mobile Apps
Test Automation Framework with BDD and Cucumber
Automation With Appium
Cucumber BDD
Appium Presentation
Developing Faster with Swagger
Colorful world-of-visual-automation-testing-latest
Intro to Visual Test Automation with Applitools Eyes
Getting started with appium
Automation testing on ios platform using appium
Swagger - make your API accessible
Ad

Viewers also liked (20)

PDF
Ui testing with espresso
PDF
Android Espresso
PDF
Continous UI testing with Espresso and Jenkins
PPTX
Tech Talk #5 : Android Automation Test with Espresso - Trần Văn Toàn
PDF
Espresso Presentation FINAL
PDF
Automated android testing using jenkins ci
PPTX
Do You Enjoy Espresso in Android App Testing?
POT
Fast deterministic screenshot tests for Android
PPT
Mobile applications and automation testing
PDF
Ewa Bielska: Testowanie aplikacji mobilnych
PDF
Automated UI Testing Frameworks
PDF
Packaging Your Story: Social Media for B2Bs
PDF
Screenshots Test spoon + espresso
PPTX
Espresso Powerpoint
PDF
[XCode] Automating UI Testing
PPTX
Writing and using Hamcrest Matchers
ODP
Strategie automatyzacji testow
PPTX
PDF
JUnit Kung Fu: Getting More Out of Your Unit Tests
PDF
JUnit & Mockito, first steps
Ui testing with espresso
Android Espresso
Continous UI testing with Espresso and Jenkins
Tech Talk #5 : Android Automation Test with Espresso - Trần Văn Toàn
Espresso Presentation FINAL
Automated android testing using jenkins ci
Do You Enjoy Espresso in Android App Testing?
Fast deterministic screenshot tests for Android
Mobile applications and automation testing
Ewa Bielska: Testowanie aplikacji mobilnych
Automated UI Testing Frameworks
Packaging Your Story: Social Media for B2Bs
Screenshots Test spoon + espresso
Espresso Powerpoint
[XCode] Automating UI Testing
Writing and using Hamcrest Matchers
Strategie automatyzacji testow
JUnit Kung Fu: Getting More Out of Your Unit Tests
JUnit & Mockito, first steps
Ad

Similar to Espresso testing (20)

PDF
A Comprehensive Guide To Espresso Testing.pdf
ODP
PDF
Overview the Challenges and Limitations of Android App Automation with Espres...
PPTX
Appium vs Espresso and XCUI Test
PDF
Beyond Appium: Testing with Espresso & the Real Device Cloud
PPTX
Espresso workshop
DOCX
5 Easy Steps to Learn Espresso
PPTX
Continuous testing on emulators using the espresso test automation framework
PDF
Espresso devoxx 2014
PPTX
Android testing
PDF
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...
PDF
Utilizando Espresso e UIAutomator no Teste de Apps Android
PDF
Android UI Testing with Espresso - How to Get Started.pdf
PPTX
Espresso vs. EyeAutomate: comparing two generations of Android GUI testing tools
PDF
Utilizando expresso uiautomator na automacao de testes em apps android
PPTX
Make Your UI Tests Resilient with the Next Generation of Frameworks
PDF
A guide to Android automated testing
PPTX
Choosing the Best Open Source Test Automation Tool for You
PPTX
Android Apps Testing in 2019
PDF
Best Mobile Test Automation Solutions: Beyond Appium
A Comprehensive Guide To Espresso Testing.pdf
Overview the Challenges and Limitations of Android App Automation with Espres...
Appium vs Espresso and XCUI Test
Beyond Appium: Testing with Espresso & the Real Device Cloud
Espresso workshop
5 Easy Steps to Learn Espresso
Continuous testing on emulators using the espresso test automation framework
Espresso devoxx 2014
Android testing
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...
Utilizando Espresso e UIAutomator no Teste de Apps Android
Android UI Testing with Espresso - How to Get Started.pdf
Espresso vs. EyeAutomate: comparing two generations of Android GUI testing tools
Utilizando expresso uiautomator na automacao de testes em apps android
Make Your UI Tests Resilient with the Next Generation of Frameworks
A guide to Android automated testing
Choosing the Best Open Source Test Automation Tool for You
Android Apps Testing in 2019
Best Mobile Test Automation Solutions: Beyond Appium

More from vodqancr (8)

PPTX
Security testing zap it
PPT
Nakal
PDF
Laws of test automation framework
PPTX
Tests supporting multiple mobile platforms
PDF
Big data testing (1)
PPTX
Web service testing_final.pptx
PPT
Introduction to Gauge
PPTX
Unbox yourself Into Testing
Security testing zap it
Nakal
Laws of test automation framework
Tests supporting multiple mobile platforms
Big data testing (1)
Web service testing_final.pptx
Introduction to Gauge
Unbox yourself Into Testing

Recently uploaded (20)

PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
cloud_computing_Infrastucture_as_cloud_p
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
Spectroscopy.pptx food analysis technology
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
1. Introduction to Computer Programming.pptx
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Approach and Philosophy of On baking technology
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Getting Started with Data Integration: FME Form 101
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
A Presentation on Artificial Intelligence
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PPTX
TLE Review Electricity (Electricity).pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Mushroom cultivation and it's methods.pdf
Assigned Numbers - 2025 - Bluetooth® Document
cloud_computing_Infrastucture_as_cloud_p
Group 1 Presentation -Planning and Decision Making .pptx
Spectroscopy.pptx food analysis technology
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
1. Introduction to Computer Programming.pptx
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Approach and Philosophy of On baking technology
MIND Revenue Release Quarter 2 2025 Press Release
Getting Started with Data Integration: FME Form 101
Unlocking AI with Model Context Protocol (MCP)
A Presentation on Artificial Intelligence
Advanced methodologies resolving dimensionality complications for autism neur...
Heart disease approach using modified random forest and particle swarm optimi...
TLE Review Electricity (Electricity).pptx
Spectral efficient network and resource selection model in 5G networks
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Mushroom cultivation and it's methods.pdf

Espresso testing