SlideShare una empresa de Scribd logo
1 de 57
Descargar para leer sin conexión
Testing on Mobile
Devices with Location
Services
Eyal Yovel, Solutions Architect
April, 2021
About me
2
○ Solutions Architect at Sauce Labs,
based in London, UK
○ I have over 15 years of experience in
software development and software
automation
○ I have a passion for learning new
technologies and new test
frameworks
Eyal Yovel
@eyalyovel
https://github.com/eyaly
Agenda
3
○ Introduction
○ Changing geo location manually
○ Changing geo location using Appium Desktop
○ Automate end-to-end user flow with location services - iOS
○ Automate e2e user flow with location services – Android
○ Automate e2e user flow with location services – Execution
○ Automate e2e user flow with location services – Web App
○ About Geo-IP
© Sauce Labs, Inc. 4
What Why
Location Services
© Sauce Labs, Inc. 5
© Sauce Labs, Inc. 6
GPS
receiver
GPS
satellites
Assisted
GPS
How does GPS work on my phone?
7
How does GPS work on my phone?
Latitude
Longitude
Altitude
8
Latitude and Longitude
9
Latitude and Longitude
Latitude - Imaginary lines that measure distance north and south of the
equator
Longitude - Imaginary lines that measure distance east and west of the
prime meridian
Altitude - How high a location is above sea level
10
Latitude and Longitude
11
Changing Geo Location Manually
12
Changing Geo Location - iOS Simulator
13
Changing Geo Location - Android Emulator
14
Changing Geo Location - Sauce Labs Real devices
15
Set/Get Geo Location - Appium Commands
16
Set Geo Location - Appium Command
17
Get Geo Location - Appium Command
18
Demo App
https://github.com/saucelabs/sample-app-mobile/releases
19
Set/Get Geo Location - Appium Commands -Demo
20
End to End User Flow with Location Services - iOS
Preparation Permission Alert Test the page
21
End to End User Flow with Location Services - iOS
22
End to End User Flow with Location Services - iOS
https://github.com/eyaly/testng-geo-location-examples
23
End to End User Flow with Location Services - iOS
https://github.com/eyaly/testng-geo-location-examples
24
End to End User Flow with Location Services - iOS
https://github.com/eyaly/testng-geo-location-examples
25
End to End User Flow with Location Services - iOS
https://github.com/eyaly/testng-geo-location-examples
26
End to End User Flow with Location Services - iOS
27
End to End User Flow with Location Services - iOS
28
End to End User Flow with Location Services - iOS
iOS >= 13
iOS =< 12
29
End to End User Flow with Location Services - iOS
https://appium.io/docs/en/writing-running-appium/caps/
// this capability will work for alerts with 2 options (iOS 12 and below)
capabilities.setCapability("autoAcceptAlerts", true);
30
End to End User Flow with Location Services - iOS
https://github.com/appium/appium-xcuitest-driver#settings-api
// change the setting to accept alerts with 3 options
// and select the "Allow While Using App" (iOS 13 and above)
getiosDriver().setSetting("acceptAlertButtonSelector",
"**/XCUIElementTypeButton[`label == "Allow While Using
App"`]");
34
End to End User Flow with Location Services - iOS
35
End to End User Flow with Location Services - iOS
https://github.com/eyaly/testng-geo-location-examples
36
End to End User Flow with Location Services - Android
Preparation Permission Alert Test the page
37
End to End User Flow with Location Services - Android
For API level 29 (Android 10) and above:
Enable: adb shell settings put secure location_mode 3
Disable: adb shell settings put secure location_mode 0
For API level 28 (Android 9) and below:
Enable: adb shell settings put secure
location_providers_allowed +gps
Disable: adb shell settings put secure
location_providers_allowed -gps
38
End to End User Flow with Location Services - Android
39
End to End User Flow with Location Services - Android
40
End to End User Flow with Location Services - Android
Android >= 10
Android =< 9
41
End to End User Flow with Location Services - Android
https://appium.io/docs/en/writing-running-appium/caps/
// Grant permission for alert popups
capabilities.setCapability("autoGrantPermissions", true);
42
End to End User Flow with Location Services - Android
// Grant permission for alert popups
capabilities.setCapability("autoGrantPermissions", true);
43
End to End User Flow with Location Services - Android
// Grant permission for alert popups
capabilities.setCapability("autoGrantPermissions", true);
45
End to End User Flow with Location Services - Execution
46
End to End User Flow with Location Services - Execution
47
End to End User Flow with Location Services - Execution
48
And what about Web Apps…?
49
And what about Web Apps…?
50
End to End User Flow with Location Services - Web
51
End to End User Flow with Location Services - Web
52
End to End User Flow with Location Services - Web
53
End to End User Flow with Location Services - Web
https://github.com/eyaly/testng-geo-location-examples
54
Let’s talk about something new…
55
Let’s talk about something new…
56
Let’s talk about Geo-IP
GeoIP refersto the method oflocating a computer terminal’s
geographic location by identifying that terminal’s IP address.
(https://help.nexcess.net/77285-other/what-is-geoip)
An IP address is assigned to each device (e.g. computer, printer)
participating in a computer network that uses the Internet Protocol for
communication (https://en.wikipedia.org/wiki/Internet_geolocation)
57
How to change my Geo-IP
- Use VPN (Virtual Private Network) services
- VPN Provider: WonderProxy (https://wonderproxy.com/)
- Use WonderProxy to change the Geolocation of your test traffic
Sauce:
https://wonderproxy.com/docs/devs/guides/globalize-your-testing-with-sauce
https://wiki.saucelabs.com/pages/viewpage.action?pageId=48365781
58
How to Test from different countries
- Use Sauce Connect (tunnel) + WonderProxy
59
How to Test from different countries
Q&A
Q&A
Let’s do this.

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Mobile Automation with Appium
Mobile Automation with AppiumMobile Automation with Appium
Mobile Automation with Appium
 
Software Testing Process
Software Testing ProcessSoftware Testing Process
Software Testing Process
 
Appium Presentation
Appium Presentation Appium Presentation
Appium Presentation
 
Test Automation in Agile
Test Automation in AgileTest Automation in Agile
Test Automation in Agile
 
Tips for Writing Better Charters for Exploratory Testing Sessions by Michael...
 Tips for Writing Better Charters for Exploratory Testing Sessions by Michael... Tips for Writing Better Charters for Exploratory Testing Sessions by Michael...
Tips for Writing Better Charters for Exploratory Testing Sessions by Michael...
 
Cross browser testing using BrowserStack
Cross browser testing using BrowserStack Cross browser testing using BrowserStack
Cross browser testing using BrowserStack
 
QA metrics in Agile (GUIDE)
QA metrics in Agile (GUIDE)QA metrics in Agile (GUIDE)
QA metrics in Agile (GUIDE)
 
Testing types functional and nonfunctional - Kati Holasz
Testing types   functional and nonfunctional - Kati HolaszTesting types   functional and nonfunctional - Kati Holasz
Testing types functional and nonfunctional - Kati Holasz
 
Performance Testing Using JMeter | Edureka
Performance Testing Using JMeter | EdurekaPerformance Testing Using JMeter | Edureka
Performance Testing Using JMeter | Edureka
 
Automation Testing by Selenium Web Driver
Automation Testing by Selenium Web DriverAutomation Testing by Selenium Web Driver
Automation Testing by Selenium Web Driver
 
Test Automation Framework Designs
Test Automation Framework DesignsTest Automation Framework Designs
Test Automation Framework Designs
 
Test Automation and Selenium
Test Automation and SeleniumTest Automation and Selenium
Test Automation and Selenium
 
Introduction to Agile Testing
Introduction to Agile TestingIntroduction to Agile Testing
Introduction to Agile Testing
 
ISTQB Foundation Level Basic
ISTQB Foundation Level BasicISTQB Foundation Level Basic
ISTQB Foundation Level Basic
 
Introduction to jmeter
Introduction to jmeterIntroduction to jmeter
Introduction to jmeter
 
Effective Software Test Case Design Approach
Effective Software Test Case Design ApproachEffective Software Test Case Design Approach
Effective Software Test Case Design Approach
 
Mobile application testing tutorial
Mobile application testing tutorialMobile application testing tutorial
Mobile application testing tutorial
 
Introducing AWS Device Farm
Introducing AWS Device FarmIntroducing AWS Device Farm
Introducing AWS Device Farm
 
Exploratory testing using heuristics
Exploratory testing using heuristicsExploratory testing using heuristics
Exploratory testing using heuristics
 
Data driven Automation Framework with Selenium
Data driven Automation Framework with Selenium Data driven Automation Framework with Selenium
Data driven Automation Framework with Selenium
 

Similar a Testing on Mobile Devices with Location Services

From Point & Click to Pinch & Zoom by Dan Rabinovitz
From Point & Click to Pinch & Zoom by Dan RabinovitzFrom Point & Click to Pinch & Zoom by Dan Rabinovitz
From Point & Click to Pinch & Zoom by Dan Rabinovitz
Sauce Labs
 
Osgis2011 edina addy_pope
Osgis2011 edina addy_popeOsgis2011 edina addy_pope
Osgis2011 edina addy_pope
Addy Pope
 
Cloud web applications: the new perspective of sproutcore
Cloud web applications: the new perspective of sproutcoreCloud web applications: the new perspective of sproutcore
Cloud web applications: the new perspective of sproutcore
David Saitta
 
Appium mobile web+dev conference
Appium   mobile web+dev conferenceAppium   mobile web+dev conference
Appium mobile web+dev conference
Isaac Murchie
 

Similar a Testing on Mobile Devices with Location Services (20)

Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
 
Dipping Your Toes Into Cloud Native Application Development
Dipping Your Toes Into Cloud Native Application DevelopmentDipping Your Toes Into Cloud Native Application Development
Dipping Your Toes Into Cloud Native Application Development
 
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 ...
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
 
From Point & Click to Pinch & Zoom by Dan Rabinovitz
From Point & Click to Pinch & Zoom by Dan RabinovitzFrom Point & Click to Pinch & Zoom by Dan Rabinovitz
From Point & Click to Pinch & Zoom by Dan Rabinovitz
 
AWS 고객사를 위한 ‘AWS 컨테이너 교육’ - 유재석, AWS 솔루션즈 아키텍트
AWS 고객사를 위한 ‘AWS 컨테이너 교육’ - 유재석, AWS 솔루션즈 아키텍트AWS 고객사를 위한 ‘AWS 컨테이너 교육’ - 유재석, AWS 솔루션즈 아키텍트
AWS 고객사를 위한 ‘AWS 컨테이너 교육’ - 유재석, AWS 솔루션즈 아키텍트
 
Nyc mule soft_meetup_13_march_2021
Nyc mule soft_meetup_13_march_2021Nyc mule soft_meetup_13_march_2021
Nyc mule soft_meetup_13_march_2021
 
Overseeing Ship's Surveys and Surveyors Globally Using IoT and Docker by Jay ...
Overseeing Ship's Surveys and Surveyors Globally Using IoT and Docker by Jay ...Overseeing Ship's Surveys and Surveyors Globally Using IoT and Docker by Jay ...
Overseeing Ship's Surveys and Surveyors Globally Using IoT and Docker by Jay ...
 
PhD Dissertation Defense (April 2015)
PhD Dissertation Defense (April 2015)PhD Dissertation Defense (April 2015)
PhD Dissertation Defense (April 2015)
 
Osgis2011 edina addy_pope
Osgis2011 edina addy_popeOsgis2011 edina addy_pope
Osgis2011 edina addy_pope
 
Osgis2011 edina addy_pope
Osgis2011 edina addy_popeOsgis2011 edina addy_pope
Osgis2011 edina addy_pope
 
Building a full-stack app with Golang and Google Cloud Platform in one week
Building a full-stack app with Golang and Google Cloud Platform in one weekBuilding a full-stack app with Golang and Google Cloud Platform in one week
Building a full-stack app with Golang and Google Cloud Platform in one week
 
Cloud web applications: the new perspective of sproutcore
Cloud web applications: the new perspective of sproutcoreCloud web applications: the new perspective of sproutcore
Cloud web applications: the new perspective of sproutcore
 
Appium solution
Appium solutionAppium solution
Appium solution
 
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Jforum S...
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Jforum S...Microservices for the Masses with Spring Boot, JHipster, and OAuth - Jforum S...
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Jforum S...
 
Appium workship, Mobile Web+Dev Conference
Appium workship,  Mobile Web+Dev ConferenceAppium workship,  Mobile Web+Dev Conference
Appium workship, Mobile Web+Dev Conference
 
Appium mobile web+dev conference
Appium   mobile web+dev conferenceAppium   mobile web+dev conference
Appium mobile web+dev conference
 
AWS Container Services – 유재석 (AWS 솔루션즈 아키텍트)
AWS Container Services – 유재석 (AWS 솔루션즈 아키텍트)AWS Container Services – 유재석 (AWS 솔루션즈 아키텍트)
AWS Container Services – 유재석 (AWS 솔루션즈 아키텍트)
 
Amazon Container Services – 유재석 (AWS 솔루션즈 아키텍트)
 Amazon Container Services – 유재석 (AWS 솔루션즈 아키텍트) Amazon Container Services – 유재석 (AWS 솔루션즈 아키텍트)
Amazon Container Services – 유재석 (AWS 솔루션즈 아키텍트)
 
Getting Started with Android Development
Getting Started with Android DevelopmentGetting Started with Android Development
Getting Started with Android Development
 

Más de 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
 

Más de 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
 

Último

Último (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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
 
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
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 

Testing on Mobile Devices with Location Services

  • 1. Testing on Mobile Devices with Location Services Eyal Yovel, Solutions Architect April, 2021
  • 2. About me 2 ○ Solutions Architect at Sauce Labs, based in London, UK ○ I have over 15 years of experience in software development and software automation ○ I have a passion for learning new technologies and new test frameworks Eyal Yovel @eyalyovel https://github.com/eyaly
  • 3. Agenda 3 ○ Introduction ○ Changing geo location manually ○ Changing geo location using Appium Desktop ○ Automate end-to-end user flow with location services - iOS ○ Automate e2e user flow with location services – Android ○ Automate e2e user flow with location services – Execution ○ Automate e2e user flow with location services – Web App ○ About Geo-IP
  • 4. © Sauce Labs, Inc. 4 What Why Location Services
  • 5. © Sauce Labs, Inc. 5
  • 6. © Sauce Labs, Inc. 6 GPS receiver GPS satellites Assisted GPS How does GPS work on my phone?
  • 7. 7 How does GPS work on my phone? Latitude Longitude Altitude
  • 9. 9 Latitude and Longitude Latitude - Imaginary lines that measure distance north and south of the equator Longitude - Imaginary lines that measure distance east and west of the prime meridian Altitude - How high a location is above sea level
  • 12. 12 Changing Geo Location - iOS Simulator
  • 13. 13 Changing Geo Location - Android Emulator
  • 14. 14 Changing Geo Location - Sauce Labs Real devices
  • 15. 15 Set/Get Geo Location - Appium Commands
  • 16. 16 Set Geo Location - Appium Command
  • 17. 17 Get Geo Location - Appium Command
  • 19. 19 Set/Get Geo Location - Appium Commands -Demo
  • 20. 20 End to End User Flow with Location Services - iOS Preparation Permission Alert Test the page
  • 21. 21 End to End User Flow with Location Services - iOS
  • 22. 22 End to End User Flow with Location Services - iOS https://github.com/eyaly/testng-geo-location-examples
  • 23. 23 End to End User Flow with Location Services - iOS https://github.com/eyaly/testng-geo-location-examples
  • 24. 24 End to End User Flow with Location Services - iOS https://github.com/eyaly/testng-geo-location-examples
  • 25. 25 End to End User Flow with Location Services - iOS https://github.com/eyaly/testng-geo-location-examples
  • 26. 26 End to End User Flow with Location Services - iOS
  • 27. 27 End to End User Flow with Location Services - iOS
  • 28. 28 End to End User Flow with Location Services - iOS iOS >= 13 iOS =< 12
  • 29. 29 End to End User Flow with Location Services - iOS https://appium.io/docs/en/writing-running-appium/caps/ // this capability will work for alerts with 2 options (iOS 12 and below) capabilities.setCapability("autoAcceptAlerts", true);
  • 30. 30 End to End User Flow with Location Services - iOS https://github.com/appium/appium-xcuitest-driver#settings-api // change the setting to accept alerts with 3 options // and select the "Allow While Using App" (iOS 13 and above) getiosDriver().setSetting("acceptAlertButtonSelector", "**/XCUIElementTypeButton[`label == "Allow While Using App"`]");
  • 31. 34 End to End User Flow with Location Services - iOS
  • 32. 35 End to End User Flow with Location Services - iOS https://github.com/eyaly/testng-geo-location-examples
  • 33. 36 End to End User Flow with Location Services - Android Preparation Permission Alert Test the page
  • 34. 37 End to End User Flow with Location Services - Android For API level 29 (Android 10) and above: Enable: adb shell settings put secure location_mode 3 Disable: adb shell settings put secure location_mode 0 For API level 28 (Android 9) and below: Enable: adb shell settings put secure location_providers_allowed +gps Disable: adb shell settings put secure location_providers_allowed -gps
  • 35. 38 End to End User Flow with Location Services - Android
  • 36. 39 End to End User Flow with Location Services - Android
  • 37. 40 End to End User Flow with Location Services - Android Android >= 10 Android =< 9
  • 38. 41 End to End User Flow with Location Services - Android https://appium.io/docs/en/writing-running-appium/caps/ // Grant permission for alert popups capabilities.setCapability("autoGrantPermissions", true);
  • 39. 42 End to End User Flow with Location Services - Android // Grant permission for alert popups capabilities.setCapability("autoGrantPermissions", true);
  • 40. 43 End to End User Flow with Location Services - Android // Grant permission for alert popups capabilities.setCapability("autoGrantPermissions", true);
  • 41. 45 End to End User Flow with Location Services - Execution
  • 42. 46 End to End User Flow with Location Services - Execution
  • 43. 47 End to End User Flow with Location Services - Execution
  • 44. 48 And what about Web Apps…?
  • 45. 49 And what about Web Apps…?
  • 46. 50 End to End User Flow with Location Services - Web
  • 47. 51 End to End User Flow with Location Services - Web
  • 48. 52 End to End User Flow with Location Services - Web
  • 49. 53 End to End User Flow with Location Services - Web https://github.com/eyaly/testng-geo-location-examples
  • 50. 54 Let’s talk about something new…
  • 51. 55 Let’s talk about something new…
  • 52. 56 Let’s talk about Geo-IP GeoIP refersto the method oflocating a computer terminal’s geographic location by identifying that terminal’s IP address. (https://help.nexcess.net/77285-other/what-is-geoip) An IP address is assigned to each device (e.g. computer, printer) participating in a computer network that uses the Internet Protocol for communication (https://en.wikipedia.org/wiki/Internet_geolocation)
  • 53. 57 How to change my Geo-IP - Use VPN (Virtual Private Network) services - VPN Provider: WonderProxy (https://wonderproxy.com/) - Use WonderProxy to change the Geolocation of your test traffic Sauce: https://wonderproxy.com/docs/devs/guides/globalize-your-testing-with-sauce https://wiki.saucelabs.com/pages/viewpage.action?pageId=48365781
  • 54. 58 How to Test from different countries - Use Sauce Connect (tunnel) + WonderProxy
  • 55. 59 How to Test from different countries