SlideShare a Scribd company logo
1 of 32
Download to read offline
ONE TEST TO RULE THEM ALL
- CONQUER ANDROID AND
IOS WITH ONE SCRIPT
EYAL YOVEL, SOLUTION ARCHITECT QUALITEST GROUP
AUGUST 29, 2017
ASAF SAAR, MOBILE PRODUCT MANAGEMENT DIRECTOR, SAUCE LABS
AUGUST 29, 2017
EYAL YOVEL, SOLUTION ARCHITECT QUALITEST
GROUP
ASAF SAAR, MOBILE PRODUCT MANAGEMENT
DIRECTOR, SAUCE LABS
MOBILE TESTING STRATEGY
Mobile App TestingWeb Testing
The industry’s only cloud-based testing platform for both
web and mobile applications that spans desktops,
simulators, emulators and real devices
Desktops Emulators & Simulators Real Devices
MOBILE FIRST AT SCALE
By 2022, 70% of software interactions in
enterprises will occur on mobile devices.
Market	Guide	for	Mobile	Application	Testing	
Services
Susanne	Matson	(June	2017)
CURRENT MOBILE OFFERING
Manual Testing
Automated Testing
Emulators & Simulators
Public Cloud Private Cloud
Real Devices
Public Cloud
Mobile Testing
SECURITY & PRIVACY
GARTNER SUPPORTS OUR APPROACH
A recommended approach is to find a
healthy mix of emulators, simulators and
real devices to get the best out of your
test automation.
Market	Guide	for	Mobile	App	Test	Automation	Tools
Maritess	Sobejana	(April	2016)
COMPREHENSIVE MOBILE TESTING
Device Testing (on Wi-Fi
Networks + Networks
Simulation Tools)
● Recommended only for small subset of network-
dependent use cases
● Use for stable features
● Distribute features across device models and form factors
● Important for UX Testing
● Combine with WANem or similar tools for simulating
network connectivity conditions
● High volume functional tests for large integration builds
● Frequent builds with high concurrency to reduce build times,
enabling dev teams to not block each other
Device
Testing
(in network)
Device Testing (on Wi-Fi
Networks + Networks
Simulation Tools)
Emulator	&	
Simulator Testing
EMULATORS, SIMULATORS & REAL DEVICES COVER ALL USE CASES
THE CHALLENGES FACED BY QA
THE CHALLENGES FACED BY QA
AUGUST 29, 2017 © Sauce Labs, Inc. 10
Appium	is	an	open	source	tool	for	
automating	native,	mobile	web	and	
hybrid	applications	on	iOS	and	Android	
platforms
THE CHALLENGES FACED BY QA
AUGUST 29, 2017 © Sauce Labs, Inc. 11
THE CHALLENGES FACED BY QA
AUGUST 29, 2017 © Sauce Labs, Inc. 12
How	to	speed	up	writing	tests	using	the	
Serenity	BDD	Framework	and	the	Page	
Object	Model
Challenges	and	solutions	for	developing	a	
cross-platform	mobile	testing	solution
How	to	define	and	implement	a	mobile	
testing	strategy
PAGE OBJECT MODEL
WHAT IS A PAGE OBJECT MODEL
AUGUST 29, 2017
• Modelling UI components as objects to be consumed by test code
• Representation of the services offered by a page
• Abstracts test logic away from interaction with the WebDriver API and
System-Under-Test
© Sauce Labs, Inc. 14
WHY PAGE OBJECT MODEL
AUGUST 29, 2017
• Expose page and component services rather than mechanics
• Write concise tests that exercise functionality, not technical details
• Create maintainable tests by isolating the effect of UI change on test code
• Produce readable tests by keeping implementation details out of test code.
© Sauce Labs, Inc. 15
AUGUST 29, 2017
• Tests are comprised of steps
• Steps interact with pages
• Pages provide services and key components
• Operations on pages occur without any knowledge
of page structure
• Pages are comprised of elements
• Each element represents a single item on a page
that can be interacted with
• Text, buttons, fields, images, etc.
LAYERS OF ABSTRACTION
© Sauce Labs, Inc. 16
Steps
Page	
Objects
Elements
Tests
INTRODUCING
AUGUST 29, 2017
• Demonstrating the Page Object Model requires a testing framework
• Serenity is an open source Java (and recently JavaScript) library to speed up
writing tests; including:
• Complete WebDriver testing framework
• Parallel execution of tests using JUnit, Cucumber or JBehave
• Integration with Sauce Labs, Appium, JIRA, and other testing tools
• Detailed reporting
• Well used across the industry.
© Sauce Labs, Inc. 18
ABOUT THE DEMO ENVIRONMENT
THE SYSTEM UNDER TEST
AUGUST 29, 2017 © Sauce Labs, Inc. 20
My giffgaff App – A UK mobile network
AUGUST 29, 2017
Introducing a basic Serenity test
Scenario: Log in to the giffgaff App
Given I am not logged in
When I log in as ‘eyalyovel’
Then I am logged in as ‘eyalyovel’
Framework:
• Serenity, Appium, BDD (feature file) and Maven
• Execute on local Samsung galaxy S6 device and on
iPhone 7 simulator located on the Sauce Labs cloud
• Hard-coded test data
LOGIN TEST
© Sauce Labs, Inc. 21
Steps
LoginSteps
Page	Objects
LoginPage
MygiffgaffAccountPag
e
Elements
usernameField
passwordField
loginButton
Test
Login.feature
AUGUST 29, 2017
DEMO THE FRAMEWORK
© Sauce Labs, Inc. 22
CHALLENGES AND SOLUTIONS FOR
DEVELOPING A CROSS-PLATFORM
MOBILE TESTING SOLUTION
FIND ELEMENTS IN ANDROID AND IOS
AUGUST 29, 2017
IN MOST CASES WE WILL NOT BE ABLE TO FIND AN ELEMENT USING THE SAME IDENTIFIER IN
ANDROID AND IOS
© Sauce Labs, Inc. 24
FIND ELEMENTS IN ANDROID AND IOS
AUGUST 29, 2017
IN MOST CASES WE WILL NOT BE ABLE TO FIND AN ELEMENT USING THE SAME IDENTIFIER IN
ANDROID AND IOS
© Sauce Labs, Inc. 25
DIFFERENCES IN BEHAVIOR
AUGUST 29, 2017
DIFFERENCES IN BEHAVIOR BETWEEN THE PLATFORMS
FOR EXAMPLE: FIND THE MEMBER NAME:
© Sauce Labs, Inc. 26
DIFFERENCES IN BEHAVIOR
AUGUST 29, 2017
DIFFERENCES IN BEHAVIOR BETWEEN THE PLATFORMS
FOR EXAMPLE: FIND THE MEMBER NAME:
© Sauce Labs, Inc. 27
SOLUTION FOR FIND ELEMENTS
AUGUST 29, 2017
USE THE ANNOTATIONS @ANDROIDFINDBY AND @IOSFINDBY
© Sauce Labs, Inc. 28
SOLUTION FOR DIFFERENCES IN BEHAVIOR
AUGUST 29, 2017
WE WILL NEED DIFFERENT STEPS/CODE FOR THE DIFFERENT PLATFORMS FOR EXECUTING
THE SAME SCENARIO.
© Sauce Labs, Inc. 29
• We can have different page object files for the Android and the iOS pages
• Before running the tests, find what is the platform and run the code according
to that
AUGUST 29, 2017
DEMO RUN ON ANDROID PLATFORM
© Sauce Labs, Inc. 30
AUGUST 29, 2017
DEMO RUN ON IOS PLATFORM
© Sauce Labs, Inc. 31
LET’S DO THIS.

More Related Content

What's hot

Visual Testing: Quality and Speed -- by GIl Tayar, Applitools
Visual Testing: Quality and Speed -- by GIl Tayar, Applitools Visual Testing: Quality and Speed -- by GIl Tayar, Applitools
Visual Testing: Quality and Speed -- by GIl Tayar, Applitools
Applitools
 

What's hot (20)

Boston meetup blaze_meter_feb2017
Boston meetup blaze_meter_feb2017Boston meetup blaze_meter_feb2017
Boston meetup blaze_meter_feb2017
 
Visual Testing: Quality and Speed -- by GIl Tayar, Applitools
Visual Testing: Quality and Speed -- by GIl Tayar, Applitools Visual Testing: Quality and Speed -- by GIl Tayar, Applitools
Visual Testing: Quality and Speed -- by GIl Tayar, Applitools
 
Top Best Practices for Successful Mobile Test Automation
Top Best Practices for Successful Mobile Test AutomationTop Best Practices for Successful Mobile Test Automation
Top Best Practices for Successful Mobile Test Automation
 
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on WebinarParallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
 
Selenium Camp 2016
Selenium Camp 2016Selenium Camp 2016
Selenium Camp 2016
 
Advanced Techniques for Testing Responsive Apps and Sites -- By Aakrit Prasad
 Advanced Techniques for Testing Responsive Apps and Sites -- By Aakrit Prasad Advanced Techniques for Testing Responsive Apps and Sites -- By Aakrit Prasad
Advanced Techniques for Testing Responsive Apps and Sites -- By Aakrit Prasad
 
Wheat - Mobile functional test automation
Wheat - Mobile functional test automationWheat - Mobile functional test automation
Wheat - Mobile functional test automation
 
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
 
On boarding Appium Open Source
On boarding Appium Open SourceOn boarding Appium Open Source
On boarding Appium Open Source
 
Mobile Test Automation
Mobile Test AutomationMobile Test Automation
Mobile Test Automation
 
Cross platform test automation using Appium
Cross platform test automation using AppiumCross platform test automation using Appium
Cross platform test automation using Appium
 
[Srijan Wednesday Webinars] Building a High Performance QA Team
[Srijan Wednesday Webinars] Building a High Performance QA Team[Srijan Wednesday Webinars] Building a High Performance QA Team
[Srijan Wednesday Webinars] Building a High Performance QA Team
 
Appium tutorial| Appium Training
Appium tutorial| Appium Training Appium tutorial| Appium Training
Appium tutorial| Appium Training
 
Automation Testing With Appium
Automation Testing With AppiumAutomation Testing With Appium
Automation Testing With Appium
 
Testing on Mobile Devices with Location Services
Testing on Mobile Devices with Location ServicesTesting on Mobile Devices with Location Services
Testing on Mobile Devices with Location Services
 
Testing Your Android and iOS Apps with Appium in Testdroid Cloud
Testing Your Android and iOS Apps with Appium in Testdroid CloudTesting Your Android and iOS Apps with Appium in Testdroid Cloud
Testing Your Android and iOS Apps with Appium in Testdroid Cloud
 
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
 
Finland Azure User Group #8 DevOps Mobile Client Releases
Finland Azure User Group #8 DevOps Mobile Client Releases Finland Azure User Group #8 DevOps Mobile Client Releases
Finland Azure User Group #8 DevOps Mobile Client Releases
 
App center an overview
App center  an overviewApp center  an overview
App center an overview
 
SauceCon 2017: test.allTheThings(): Digital Edition
SauceCon 2017: test.allTheThings(): Digital EditionSauceCon 2017: test.allTheThings(): Digital Edition
SauceCon 2017: test.allTheThings(): Digital Edition
 

Similar to One Test To Rule Them All - Conquer Android and iOS With One Script

Automation Proposal_V1.0
Automation Proposal_V1.0Automation Proposal_V1.0
Automation Proposal_V1.0
Dao Nhỏ
 

Similar to One Test To Rule Them All - Conquer Android and iOS With One Script (20)

Benefits of using native automation tooling for mobile application testing.pptx
Benefits of using native automation tooling for mobile application testing.pptxBenefits of using native automation tooling for mobile application testing.pptx
Benefits of using native automation tooling for mobile application testing.pptx
 
Microsoft DevOps Solution - DevOps
Microsoft DevOps Solution - DevOps  Microsoft DevOps Solution - DevOps
Microsoft DevOps Solution - DevOps
 
Colorful world-of-visual-automation-testing-latest
Colorful world-of-visual-automation-testing-latestColorful world-of-visual-automation-testing-latest
Colorful world-of-visual-automation-testing-latest
 
Discovering appium - A journey for beginners
Discovering appium - A journey for beginnersDiscovering appium - A journey for beginners
Discovering appium - A journey for beginners
 
b4usolution_Appium Mobile Automation Testing Made Awesome
b4usolution_AppiumMobile Automation Testing Made Awesomeb4usolution_AppiumMobile Automation Testing Made Awesome
b4usolution_Appium Mobile Automation Testing Made Awesome
 
Decoding Appium No-Code Test Automation With HeadSpin.pdf
Decoding Appium No-Code Test Automation With HeadSpin.pdfDecoding Appium No-Code Test Automation With HeadSpin.pdf
Decoding Appium No-Code Test Automation With HeadSpin.pdf
 
Automation Proposal_V1.0
Automation Proposal_V1.0Automation Proposal_V1.0
Automation Proposal_V1.0
 
ATAGTR2017 Protractor Cucumber BDD Approach
ATAGTR2017 Protractor Cucumber BDD ApproachATAGTR2017 Protractor Cucumber BDD Approach
ATAGTR2017 Protractor Cucumber BDD Approach
 
Appium workshop technopark trivandrum
Appium workshop technopark trivandrumAppium workshop technopark trivandrum
Appium workshop technopark trivandrum
 
Integrate Your Test Automation Tools for More Power
Integrate Your Test Automation Tools for More PowerIntegrate Your Test Automation Tools for More Power
Integrate Your Test Automation Tools for More Power
 
Testing & Troubleshooting Modern Apps with AWS Device Farm: Mobile Week SF
Testing & Troubleshooting Modern Apps with AWS Device Farm: Mobile Week SFTesting & Troubleshooting Modern Apps with AWS Device Farm: Mobile Week SF
Testing & Troubleshooting Modern Apps with AWS Device Farm: Mobile Week SF
 
Device Testing with AWS Device Farm
Device Testing with AWS Device FarmDevice Testing with AWS Device Farm
Device Testing with AWS Device Farm
 
Upgrading Mobile Tester's Weapons with Advanced Debugging
Upgrading Mobile Tester's Weapons with Advanced DebuggingUpgrading Mobile Tester's Weapons with Advanced Debugging
Upgrading Mobile Tester's Weapons with Advanced Debugging
 
ATAGTR2017 Upgrading a mobile tester's weapons with advanced debugging
ATAGTR2017 Upgrading a mobile tester's weapons with advanced debuggingATAGTR2017 Upgrading a mobile tester's weapons with advanced debugging
ATAGTR2017 Upgrading a mobile tester's weapons with advanced debugging
 
Advanced Appium
Advanced AppiumAdvanced Appium
Advanced Appium
 
Mobile UI Testing using Appium and Docker
Mobile UI Testing using Appium and DockerMobile UI Testing using Appium and Docker
Mobile UI Testing using Appium and Docker
 
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...Shifting landscape of mobile automation, and the future of Appium - Jonathan ...
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...
 
Introduction to AWS Device Farm
Introduction to AWS Device FarmIntroduction to AWS Device Farm
Introduction to AWS Device Farm
 
Testing Your App Before Launch: An Introduction to AWS Device Farm
Testing Your App Before Launch: An Introduction to AWS Device FarmTesting Your App Before Launch: An Introduction to AWS Device Farm
Testing Your App Before Launch: An Introduction to AWS Device Farm
 
DevOps on AWS: Accelerating Software Delivery with AWS Developer Tools | AWS ...
DevOps on AWS: Accelerating Software Delivery with AWS Developer Tools | AWS ...DevOps on AWS: Accelerating Software Delivery with AWS Developer Tools | AWS ...
DevOps on AWS: Accelerating Software Delivery with AWS Developer Tools | AWS ...
 

More from Sauce Labs

Your Framework for Success: introduction to JavaScript Testing at Scale
Your Framework for Success: introduction to JavaScript Testing at ScaleYour Framework for Success: introduction to JavaScript Testing at Scale
Your Framework for Success: introduction to JavaScript Testing at Scale
Sauce Labs
 
Automating Hybrid Applications with Appium
Automating Hybrid Applications with AppiumAutomating Hybrid Applications with Appium
Automating Hybrid Applications with Appium
Sauce Labs
 
Quality at Speed: More API Testing, Less UI Testing
Quality at Speed: More API Testing, Less UI TestingQuality at Speed: More API Testing, Less UI Testing
Quality at Speed: More API Testing, Less UI Testing
Sauce Labs
 
Creating Digital Confidence with Test Automation
Creating Digital Confidence with Test AutomationCreating Digital Confidence with Test Automation
Creating Digital Confidence with Test Automation
Sauce Labs
 

More from Sauce Labs (20)

Simplify Salesforce Testing with AI-Driven Codeless Tools
Simplify Salesforce Testing with AI-Driven Codeless ToolsSimplify Salesforce Testing with AI-Driven Codeless Tools
Simplify Salesforce Testing with AI-Driven Codeless Tools
 
Your Framework for Success: introduction to JavaScript Testing at Scale
Your Framework for Success: introduction to JavaScript Testing at ScaleYour Framework for Success: introduction to JavaScript Testing at Scale
Your Framework for Success: introduction to JavaScript Testing at Scale
 
Automating Hybrid Applications with Appium
Automating Hybrid Applications with AppiumAutomating Hybrid Applications with Appium
Automating Hybrid Applications with Appium
 
Quality at Speed: More API Testing, Less UI Testing
Quality at Speed: More API Testing, Less UI TestingQuality at Speed: More API Testing, Less UI Testing
Quality at Speed: More API Testing, Less UI Testing
 
Creating Digital Confidence with Test Automation
Creating Digital Confidence with Test AutomationCreating Digital Confidence with Test Automation
Creating Digital Confidence with Test Automation
 
Just Enough (Automated) Testing
Just Enough (Automated) TestingJust Enough (Automated) Testing
Just Enough (Automated) Testing
 
Using Axe to Add Accessibility Checks to Your Existing Selenium Tests
Using Axe to Add Accessibility Checks to Your Existing Selenium TestsUsing Axe to Add Accessibility Checks to Your Existing Selenium Tests
Using Axe to Add Accessibility Checks to Your Existing Selenium Tests
 
How Open Source Helps to Bring Back Product Obsession
How Open Source Helps to Bring Back Product ObsessionHow Open Source Helps to Bring Back Product Obsession
How Open Source Helps to Bring Back Product Obsession
 
Webinar: A Sneak Peek at Selenium 4 with Simon Stewart
Webinar: A Sneak Peek at Selenium 4 with Simon StewartWebinar: A Sneak Peek at Selenium 4 with Simon Stewart
Webinar: A Sneak Peek at Selenium 4 with Simon Stewart
 
[Deu] Test Automatisierung Mit Web Driver.io
[Deu] Test Automatisierung Mit Web Driver.io[Deu] Test Automatisierung Mit Web Driver.io
[Deu] Test Automatisierung Mit Web Driver.io
 
Accelerating Innovation: Leveraging Open Source to Optimize Your Shift-Left I...
Accelerating Innovation: Leveraging Open Source to Optimize Your Shift-Left I...Accelerating Innovation: Leveraging Open Source to Optimize Your Shift-Left I...
Accelerating Innovation: Leveraging Open Source to Optimize Your Shift-Left I...
 
Accelerating Your Digital Agenda with Continuous Testing ft. Forrester
Accelerating Your Digital Agenda with Continuous Testing ft. ForresterAccelerating Your Digital Agenda with Continuous Testing ft. Forrester
Accelerating Your Digital Agenda with Continuous Testing ft. Forrester
 
How to Measure Success in Continuous Testing
How to Measure Success in Continuous TestingHow to Measure Success in Continuous Testing
How to Measure Success in Continuous Testing
 
From Zero to 2.7 Million - How Verizon Media Embraced Open Source to Accelera...
From Zero to 2.7 Million - How Verizon Media Embraced Open Source to Accelera...From Zero to 2.7 Million - How Verizon Media Embraced Open Source to Accelera...
From Zero to 2.7 Million - How Verizon Media Embraced Open Source to Accelera...
 
5 Steps to Jump Start Your Test Automation
5 Steps to Jump Start Your Test Automation5 Steps to Jump Start Your Test Automation
5 Steps to Jump Start Your Test Automation
 
Sauce Labs Webinar: Rising Importance of Software Testing
Sauce Labs Webinar: Rising Importance of Software TestingSauce Labs Webinar: Rising Importance of Software Testing
Sauce Labs Webinar: Rising Importance of Software Testing
 
BDD With Selenide by Hima Bindu Peteti
BDD With Selenide by Hima Bindu PetetiBDD With Selenide by Hima Bindu Peteti
BDD With Selenide by Hima Bindu Peteti
 
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
 
Continuous Delivery for "Mature" Codebases by Melisa Benua
Continuous Delivery for "Mature" Codebases by Melisa BenuaContinuous Delivery for "Mature" Codebases by Melisa Benua
Continuous Delivery for "Mature" Codebases by Melisa Benua
 
Building Automation Engineers From Scratch by Jenny Bramble
Building Automation Engineers From Scratch by Jenny BrambleBuilding Automation Engineers From Scratch by Jenny Bramble
Building Automation Engineers From Scratch by Jenny Bramble
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

One Test To Rule Them All - Conquer Android and iOS With One Script

  • 1. ONE TEST TO RULE THEM ALL - CONQUER ANDROID AND IOS WITH ONE SCRIPT EYAL YOVEL, SOLUTION ARCHITECT QUALITEST GROUP AUGUST 29, 2017 ASAF SAAR, MOBILE PRODUCT MANAGEMENT DIRECTOR, SAUCE LABS
  • 2. AUGUST 29, 2017 EYAL YOVEL, SOLUTION ARCHITECT QUALITEST GROUP ASAF SAAR, MOBILE PRODUCT MANAGEMENT DIRECTOR, SAUCE LABS
  • 4. Mobile App TestingWeb Testing The industry’s only cloud-based testing platform for both web and mobile applications that spans desktops, simulators, emulators and real devices Desktops Emulators & Simulators Real Devices
  • 5. MOBILE FIRST AT SCALE By 2022, 70% of software interactions in enterprises will occur on mobile devices. Market Guide for Mobile Application Testing Services Susanne Matson (June 2017)
  • 6. CURRENT MOBILE OFFERING Manual Testing Automated Testing Emulators & Simulators Public Cloud Private Cloud Real Devices Public Cloud Mobile Testing SECURITY & PRIVACY
  • 7. GARTNER SUPPORTS OUR APPROACH A recommended approach is to find a healthy mix of emulators, simulators and real devices to get the best out of your test automation. Market Guide for Mobile App Test Automation Tools Maritess Sobejana (April 2016)
  • 8. COMPREHENSIVE MOBILE TESTING Device Testing (on Wi-Fi Networks + Networks Simulation Tools) ● Recommended only for small subset of network- dependent use cases ● Use for stable features ● Distribute features across device models and form factors ● Important for UX Testing ● Combine with WANem or similar tools for simulating network connectivity conditions ● High volume functional tests for large integration builds ● Frequent builds with high concurrency to reduce build times, enabling dev teams to not block each other Device Testing (in network) Device Testing (on Wi-Fi Networks + Networks Simulation Tools) Emulator & Simulator Testing EMULATORS, SIMULATORS & REAL DEVICES COVER ALL USE CASES
  • 10. THE CHALLENGES FACED BY QA AUGUST 29, 2017 © Sauce Labs, Inc. 10 Appium is an open source tool for automating native, mobile web and hybrid applications on iOS and Android platforms
  • 11. THE CHALLENGES FACED BY QA AUGUST 29, 2017 © Sauce Labs, Inc. 11
  • 12. THE CHALLENGES FACED BY QA AUGUST 29, 2017 © Sauce Labs, Inc. 12 How to speed up writing tests using the Serenity BDD Framework and the Page Object Model Challenges and solutions for developing a cross-platform mobile testing solution How to define and implement a mobile testing strategy
  • 14. WHAT IS A PAGE OBJECT MODEL AUGUST 29, 2017 • Modelling UI components as objects to be consumed by test code • Representation of the services offered by a page • Abstracts test logic away from interaction with the WebDriver API and System-Under-Test © Sauce Labs, Inc. 14
  • 15. WHY PAGE OBJECT MODEL AUGUST 29, 2017 • Expose page and component services rather than mechanics • Write concise tests that exercise functionality, not technical details • Create maintainable tests by isolating the effect of UI change on test code • Produce readable tests by keeping implementation details out of test code. © Sauce Labs, Inc. 15
  • 16. AUGUST 29, 2017 • Tests are comprised of steps • Steps interact with pages • Pages provide services and key components • Operations on pages occur without any knowledge of page structure • Pages are comprised of elements • Each element represents a single item on a page that can be interacted with • Text, buttons, fields, images, etc. LAYERS OF ABSTRACTION © Sauce Labs, Inc. 16 Steps Page Objects Elements Tests
  • 17.
  • 18. INTRODUCING AUGUST 29, 2017 • Demonstrating the Page Object Model requires a testing framework • Serenity is an open source Java (and recently JavaScript) library to speed up writing tests; including: • Complete WebDriver testing framework • Parallel execution of tests using JUnit, Cucumber or JBehave • Integration with Sauce Labs, Appium, JIRA, and other testing tools • Detailed reporting • Well used across the industry. © Sauce Labs, Inc. 18
  • 19. ABOUT THE DEMO ENVIRONMENT
  • 20. THE SYSTEM UNDER TEST AUGUST 29, 2017 © Sauce Labs, Inc. 20 My giffgaff App – A UK mobile network
  • 21. AUGUST 29, 2017 Introducing a basic Serenity test Scenario: Log in to the giffgaff App Given I am not logged in When I log in as ‘eyalyovel’ Then I am logged in as ‘eyalyovel’ Framework: • Serenity, Appium, BDD (feature file) and Maven • Execute on local Samsung galaxy S6 device and on iPhone 7 simulator located on the Sauce Labs cloud • Hard-coded test data LOGIN TEST © Sauce Labs, Inc. 21 Steps LoginSteps Page Objects LoginPage MygiffgaffAccountPag e Elements usernameField passwordField loginButton Test Login.feature
  • 22. AUGUST 29, 2017 DEMO THE FRAMEWORK © Sauce Labs, Inc. 22
  • 23. CHALLENGES AND SOLUTIONS FOR DEVELOPING A CROSS-PLATFORM MOBILE TESTING SOLUTION
  • 24. FIND ELEMENTS IN ANDROID AND IOS AUGUST 29, 2017 IN MOST CASES WE WILL NOT BE ABLE TO FIND AN ELEMENT USING THE SAME IDENTIFIER IN ANDROID AND IOS © Sauce Labs, Inc. 24
  • 25. FIND ELEMENTS IN ANDROID AND IOS AUGUST 29, 2017 IN MOST CASES WE WILL NOT BE ABLE TO FIND AN ELEMENT USING THE SAME IDENTIFIER IN ANDROID AND IOS © Sauce Labs, Inc. 25
  • 26. DIFFERENCES IN BEHAVIOR AUGUST 29, 2017 DIFFERENCES IN BEHAVIOR BETWEEN THE PLATFORMS FOR EXAMPLE: FIND THE MEMBER NAME: © Sauce Labs, Inc. 26
  • 27. DIFFERENCES IN BEHAVIOR AUGUST 29, 2017 DIFFERENCES IN BEHAVIOR BETWEEN THE PLATFORMS FOR EXAMPLE: FIND THE MEMBER NAME: © Sauce Labs, Inc. 27
  • 28. SOLUTION FOR FIND ELEMENTS AUGUST 29, 2017 USE THE ANNOTATIONS @ANDROIDFINDBY AND @IOSFINDBY © Sauce Labs, Inc. 28
  • 29. SOLUTION FOR DIFFERENCES IN BEHAVIOR AUGUST 29, 2017 WE WILL NEED DIFFERENT STEPS/CODE FOR THE DIFFERENT PLATFORMS FOR EXECUTING THE SAME SCENARIO. © Sauce Labs, Inc. 29 • We can have different page object files for the Android and the iOS pages • Before running the tests, find what is the platform and run the code according to that
  • 30. AUGUST 29, 2017 DEMO RUN ON ANDROID PLATFORM © Sauce Labs, Inc. 30
  • 31. AUGUST 29, 2017 DEMO RUN ON IOS PLATFORM © Sauce Labs, Inc. 31