SlideShare una empresa de Scribd logo
1 de 67
Descargar para leer sin conexión
1
Run your Appium tests using Docker Android
Sargis Sargsyan
2
Sargis Sargsyan
Director, Quality Assurance at PicsArt Inc
Welcome!
3
Introduction
Getting started with Appium
Docker for Android
Appium Docker
Setup docker-appium in Mac
Agenda
Appium Dockerization: from scratch to advanced implementation
4
Run Tests on Real Device
Run Android test suite on real
devices using Appium Docker
Setup Using Docker Compose
Faster setup with docker-
compose
Android Emulator in Docker
Setup android emulator with
docker
SMS Simulation
Simulate receiving SMS
5
Selenium Hub
Introduction to Selenium Hub
Connect Appium host to Hub
Register Appium host in
Selenium grid
Run Tests in Emulator
Running Appium test in
Emulator
Q&A
6
Mobile Test Pyramid
*http://elementalselenium.com/tips/71-mobile-testing-pyramid
7
Quick & easier setup
of automation
environment
Speed up Appium
test suite run
The automation
setup steps will be
done Automatically
Run on Real Devices
and Emulators
Why we need this approach
8
What is Appium?
Appium is a powerful framework that help us test our mobile applications
It supports both native and hybrid applications
It is open-source and cross-platform, giving us the ability to run test against
multiple platforms with the same API, avoiding code refactoring
It’s drive iOS , Android and Windows apps using the WebDriver protocol
9
Appium Architecture
How Appium is working
Test Runner
Appium ADB
Appium ADB
HTTP
USB connect
USB connect
10
Appium Docker Architecture
Test Runner
HTTP
USB connect
USB connect
Appium ADB
Appium ADB
docker-machine-1
docker-machine-2
11
Getting started with docker-appium
Steps for Mac OSX
12
$ docker-machine --version
docker-machine version
13
14
$ docker-machine create --driver virtualbox appium-test-machine
Create a docker-machine
15
16
17
$ docker-machine stop appium-test-machine
Enable USB in created docker-machine
18
19
$ vboxmanage modifyvm appium-test-machine --usb on --usbehci on
Enable USB in created docker-machine
* You need to install Extension Pack depends on your virtualbox version, in case you get an Error "Implementation of the USB 2.0 controller not found"
20
21
22
$ docker-machine start appium-test-machine
Start docker-machine
23
24
Add Android device and Host Controller
25
$ adb kill-server
Kill base machine adb
26
27
$ docker-machine ssh appium-test-machine
SSH to docker-machine
28
29
$ docker exec -it container-appium adb devices
Connect the device and run
30
31
On the mobile you should see this dialog
32
$ docker run --privileged -d -p 4723:4723 -v
/dev/bus/usb:/dev/bus/usb --name container-appium appium/appium
Run Appium-docker in the docker-machine
33
34
$ docker cp <path>/picsart.apk container-appium:/opt
Copy Application to Container
35
36
37
Register in Selenium Grid
Appium-Docker-Android can be connected with Selenium Grid You just need to pass the following paraments
CONNECT_TO_GRID=true
APPIUM_HOST=<appium_server_host>
APPIUM_PORT=<appium_server_port>
SELENIUM_HOST=<selenium_hub_host>
SELENIUM_PORT=<selenium_hub_port>
38
$ docker run --privileged -d -p 4723:4723
-e CONNECT_TO_GRID=true
-e APPIUM_HOST="127.0.0.1"
-e APPIUM_PORT=4723
-e SELENIUM_HOST="172.17.0.1" -e SELENIUM_PORT=4444 -v
/dev/bus/usb:/dev/bus/usb --name container-appium appium/appium
The command will look like
39
Using Docker Compose
40
$ docker-compose up -d
Run with docker-compose
41
Connect adb via Wi-Fi
42
Connect device via Wi-Fi
Set the target device to listen for a TCP/IP connection on port 5555.
adb tcpip 5555
Connect to the device by its IP address
adb connect <ip-of-mobile-device>
Confirm that your host computer is connected to the target device
adb devices
43
44
45
Android Emulator in Docker
46
Why?
What are the Purposes of Docker Android
Run UI tests for mobile websites with Appium
Build Android project and run unit tests with the latest build-tools
Run UI tests for Android applications with different frameworks (appium, espresso, robotium, etc.)
Run monkey / stress tests
*https://github.com/budtmo/docker-android
SMS testing
47
Advantages
What are the Advantages of Docker Android
noVNC to see what happen inside docker container
Ability to connect to Selenium Grid
Support real devices with screen mirroring
Ability to record video during test execution for debugging
*https://github.com/budtmo/docker-android
Integrated with other cloud solutions, e.g. Genymotion Cloud
OPEN SOURCE!
48
Supported Devices
Nexus 5
Nexus OneNexus 4
Samsung Galaxy
S6
Samsung Galaxy
S7 Edge
Samsung Galaxy
S7
Nexus 7
Nexus S
49
$ docker run --privileged -d -p 6080:6080 -p 5554:5554 -p 5555:5555
-e DEVICE="Samsung Galaxy S6" --name android-container
budtmo/docker-android-x86-8.1
Getting started!
Running Samsung Galaxy S6 Emulator
50
51
52
$ docker run --privileged -d -p 6080:6080 -p 5554:5554 -p 5555:5555
-p 4723:4723 --name android-container-appium budtmo/docker-android-
real-device
Control Real Device Connected to the Host
53
$ adb -H host.docker.internal -P 5037 devices
Connect to ADB of the Host
54
SMS Simulation
55
SMS Simulation
Find the auth_token and copy it.
docker exec -it android-container cat /root/.emulator_console_auth_token
Access emulator using telnet and login with auth_token
telnet <docker-machine-ip-address> 5554
Login with auth_token
auth <auth_token>
Send the sms
sms send <phone_number> <message>
56
57
Selenium Hub
58
*https://www.seleniumhq.org
Selenium Grid
Selenium grid is a smart proxy server
59
$ docker run -d -p 4444:4444 -v /dev/shm:/dev/shm
selenium/hub:3.14.0-curium
Run Selenium Grid in Docker
60
61
Let’s combine all these solutions
Appium
Docker Emulator
Selenium Grid
62
63
64
65
66
67
Thank You
Feel free to Contact me!

Más contenido relacionado

La actualidad más candente

Manage appium dependencies with -appium-home in appium 2.0
Manage appium dependencies with  -appium-home in appium 2.0Manage appium dependencies with  -appium-home in appium 2.0
Manage appium dependencies with -appium-home in appium 2.0Kazuaki Matsuo
 
Automation With Appium
Automation With AppiumAutomation With Appium
Automation With AppiumKnoldus Inc.
 
Using Docker for Testing
Using Docker for TestingUsing Docker for Testing
Using Docker for TestingMukta Aphale
 
Getting started with appium
Getting started with appiumGetting started with appium
Getting started with appiumPratik Patel
 
Puppeteer - Headless Chrome Node API
Puppeteer - Headless Chrome Node APIPuppeteer - Headless Chrome Node API
Puppeteer - Headless Chrome Node APIubunturk
 
Mobile Application Testing
Mobile Application TestingMobile Application Testing
Mobile Application TestingNoor Orfahly
 
DevOps with Ansible
DevOps with AnsibleDevOps with Ansible
DevOps with AnsibleSwapnil Jain
 
Autoscaled Distributed Automation using AWS at Selenium London MeetUp
Autoscaled Distributed Automation using AWS at Selenium London MeetUpAutoscaled Distributed Automation using AWS at Selenium London MeetUp
Autoscaled Distributed Automation using AWS at Selenium London MeetUparagavan
 
Unity 2D game development
Unity 2D game developmentUnity 2D game development
Unity 2D game developmentThe NineHertz
 
Unit Testing Android Applications
Unit Testing Android ApplicationsUnit Testing Android Applications
Unit Testing Android ApplicationsRody Middelkoop
 
Android - A brief introduction
Android - A brief introductionAndroid - A brief introduction
Android - A brief introductionRoshan Gautam
 

La actualidad más candente (20)

Manage appium dependencies with -appium-home in appium 2.0
Manage appium dependencies with  -appium-home in appium 2.0Manage appium dependencies with  -appium-home in appium 2.0
Manage appium dependencies with -appium-home in appium 2.0
 
Automation With Appium
Automation With AppiumAutomation With Appium
Automation With Appium
 
Using Docker for Testing
Using Docker for TestingUsing Docker for Testing
Using Docker for Testing
 
Getting started with appium
Getting started with appiumGetting started with appium
Getting started with appium
 
BDD with Cucumber
BDD with CucumberBDD with Cucumber
BDD with Cucumber
 
Puppeteer - Headless Chrome Node API
Puppeteer - Headless Chrome Node APIPuppeteer - Headless Chrome Node API
Puppeteer - Headless Chrome Node API
 
Mobile Application Testing
Mobile Application TestingMobile Application Testing
Mobile Application Testing
 
Docker swarm
Docker swarmDocker swarm
Docker swarm
 
DevOps with Ansible
DevOps with AnsibleDevOps with Ansible
DevOps with Ansible
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Jenkins-CI
Jenkins-CIJenkins-CI
Jenkins-CI
 
Appium ppt
Appium pptAppium ppt
Appium ppt
 
Appium with MySQL Database
Appium with MySQL DatabaseAppium with MySQL Database
Appium with MySQL Database
 
Autoscaled Distributed Automation using AWS at Selenium London MeetUp
Autoscaled Distributed Automation using AWS at Selenium London MeetUpAutoscaled Distributed Automation using AWS at Selenium London MeetUp
Autoscaled Distributed Automation using AWS at Selenium London MeetUp
 
Unity 2D game development
Unity 2D game developmentUnity 2D game development
Unity 2D game development
 
Appium
AppiumAppium
Appium
 
Unit Testing Android Applications
Unit Testing Android ApplicationsUnit Testing Android Applications
Unit Testing Android Applications
 
Android - A brief introduction
Android - A brief introductionAndroid - A brief introduction
Android - A brief introduction
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 
Jenkins Automation
Jenkins AutomationJenkins Automation
Jenkins Automation
 

Similar a Run your Appium tests using Docker Android - AppiumConf 2019

Docker: A New Way to Turbocharging Your Apps Development
Docker: A New Way to Turbocharging Your Apps DevelopmentDocker: A New Way to Turbocharging Your Apps Development
Docker: A New Way to Turbocharging Your Apps Developmentmsyukor
 
[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안양재동 코드랩
 
Docker Introduction.pdf
Docker Introduction.pdfDocker Introduction.pdf
Docker Introduction.pdfOKLABS
 
Docker Container As A Service - Mix-IT 2016
Docker Container As A Service - Mix-IT 2016Docker Container As A Service - Mix-IT 2016
Docker Container As A Service - Mix-IT 2016Patrick Chanezon
 
DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline  DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline Docker, Inc.
 
Academy PRO: Docker. Lecture 4
Academy PRO: Docker. Lecture 4Academy PRO: Docker. Lecture 4
Academy PRO: Docker. Lecture 4Binary Studio
 
Deploy django apps using docker
Deploy django apps using dockerDeploy django apps using docker
Deploy django apps using dockerThomas Kremmel
 
Docker in everyday development
Docker in everyday developmentDocker in everyday development
Docker in everyday developmentJustyna Ilczuk
 
Bring Continuous Integration to Your Laptop With the Drone CI Docker Extensio...
Bring Continuous Integration to Your Laptop With the Drone CI Docker Extensio...Bring Continuous Integration to Your Laptop With the Drone CI Docker Extensio...
Bring Continuous Integration to Your Laptop With the Drone CI Docker Extensio...jemije2490
 
Academy PRO: Docker. Part 4
Academy PRO: Docker. Part 4Academy PRO: Docker. Part 4
Academy PRO: Docker. Part 4Binary Studio
 
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...Ajeet Singh Raina
 
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins Mando Stam
 
ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...
ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...
ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...GoQA
 
Delivering Docker & K3s worloads to IoT Edge devices
Delivering Docker & K3s worloads to IoT Edge devicesDelivering Docker & K3s worloads to IoT Edge devices
Delivering Docker & K3s worloads to IoT Edge devicesAjeet Singh Raina
 
До чого прикладати Docker в Android? - UA Mobile 2019
До чого прикладати Docker в Android? - UA Mobile 2019До чого прикладати Docker в Android? - UA Mobile 2019
До чого прикладати Docker в Android? - UA Mobile 2019UA Mobile
 
Docker Basic to Advance
Docker Basic to AdvanceDocker Basic to Advance
Docker Basic to AdvanceParas Jain
 
Improve your Java Environment with Docker
Improve your Java Environment with DockerImprove your Java Environment with Docker
Improve your Java Environment with DockerHanoiJUG
 
Better Operations into the Cloud
Better Operations  into the CloudBetter Operations  into the Cloud
Better Operations into the CloudFabio Ferrari
 
Containerizing Web Application with Docker
Containerizing Web Application with DockerContainerizing Web Application with Docker
Containerizing Web Application with Dockermsyukor
 

Similar a Run your Appium tests using Docker Android - AppiumConf 2019 (20)

Docker: A New Way to Turbocharging Your Apps Development
Docker: A New Way to Turbocharging Your Apps DevelopmentDocker: A New Way to Turbocharging Your Apps Development
Docker: A New Way to Turbocharging Your Apps Development
 
[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안
 
Docker Introduction.pdf
Docker Introduction.pdfDocker Introduction.pdf
Docker Introduction.pdf
 
Docker how to
Docker how toDocker how to
Docker how to
 
Docker Container As A Service - Mix-IT 2016
Docker Container As A Service - Mix-IT 2016Docker Container As A Service - Mix-IT 2016
Docker Container As A Service - Mix-IT 2016
 
DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline  DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline
 
Academy PRO: Docker. Lecture 4
Academy PRO: Docker. Lecture 4Academy PRO: Docker. Lecture 4
Academy PRO: Docker. Lecture 4
 
Deploy django apps using docker
Deploy django apps using dockerDeploy django apps using docker
Deploy django apps using docker
 
Docker in everyday development
Docker in everyday developmentDocker in everyday development
Docker in everyday development
 
Bring Continuous Integration to Your Laptop With the Drone CI Docker Extensio...
Bring Continuous Integration to Your Laptop With the Drone CI Docker Extensio...Bring Continuous Integration to Your Laptop With the Drone CI Docker Extensio...
Bring Continuous Integration to Your Laptop With the Drone CI Docker Extensio...
 
Academy PRO: Docker. Part 4
Academy PRO: Docker. Part 4Academy PRO: Docker. Part 4
Academy PRO: Docker. Part 4
 
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
 
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
 
ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...
ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...
ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...
 
Delivering Docker & K3s worloads to IoT Edge devices
Delivering Docker & K3s worloads to IoT Edge devicesDelivering Docker & K3s worloads to IoT Edge devices
Delivering Docker & K3s worloads to IoT Edge devices
 
До чого прикладати Docker в Android? - UA Mobile 2019
До чого прикладати Docker в Android? - UA Mobile 2019До чого прикладати Docker в Android? - UA Mobile 2019
До чого прикладати Docker в Android? - UA Mobile 2019
 
Docker Basic to Advance
Docker Basic to AdvanceDocker Basic to Advance
Docker Basic to Advance
 
Improve your Java Environment with Docker
Improve your Java Environment with DockerImprove your Java Environment with Docker
Improve your Java Environment with Docker
 
Better Operations into the Cloud
Better Operations  into the CloudBetter Operations  into the Cloud
Better Operations into the Cloud
 
Containerizing Web Application with Docker
Containerizing Web Application with DockerContainerizing Web Application with Docker
Containerizing Web Application with Docker
 

Más de Sargis Sargsyan

Let’s Talk About Quality Engineering
Let’s Talk About Quality EngineeringLet’s Talk About Quality Engineering
Let’s Talk About Quality EngineeringSargis Sargsyan
 
Your Road to Quality Assurance
Your Road to Quality AssuranceYour Road to Quality Assurance
Your Road to Quality AssuranceSargis Sargsyan
 
Getting Started with Dockerization of Selenium Tests Execution - Testwarez 2019
Getting Started with Dockerization of Selenium Tests Execution - Testwarez 2019Getting Started with Dockerization of Selenium Tests Execution - Testwarez 2019
Getting Started with Dockerization of Selenium Tests Execution - Testwarez 2019Sargis Sargsyan
 
How to Dockerize Parallel Execution of Selenium Tests - SQA Days EU, Rgia, La...
How to Dockerize Parallel Execution of Selenium Tests - SQA Days EU, Rgia, La...How to Dockerize Parallel Execution of Selenium Tests - SQA Days EU, Rgia, La...
How to Dockerize Parallel Execution of Selenium Tests - SQA Days EU, Rgia, La...Sargis Sargsyan
 
Easy Setup for Parallel Test Execution with Selenium Docker
Easy Setup for Parallel Test Execution with Selenium DockerEasy Setup for Parallel Test Execution with Selenium Docker
Easy Setup for Parallel Test Execution with Selenium DockerSargis Sargsyan
 
Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA...
Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA...Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA...
Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA...Sargis Sargsyan
 
Test Data Preparation: Tips and Tricks - SQA Days 22 - Saint Petersburg
Test Data Preparation: Tips and Tricks - SQA Days 22 - Saint PetersburgTest Data Preparation: Tips and Tricks - SQA Days 22 - Saint Petersburg
Test Data Preparation: Tips and Tricks - SQA Days 22 - Saint PetersburgSargis Sargsyan
 
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...Sargis Sargsyan
 
Better Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component PatternBetter Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component PatternSargis Sargsyan
 
Selenium Testing on Chrome - Google DevFest Armenia 2015
Selenium Testing on Chrome - Google DevFest Armenia 2015Selenium Testing on Chrome - Google DevFest Armenia 2015
Selenium Testing on Chrome - Google DevFest Armenia 2015Sargis Sargsyan
 
Web Application Testing with Selenium
Web Application Testing with Selenium Web Application Testing with Selenium
Web Application Testing with Selenium Sargis Sargsyan
 
QA MeetUp Yerevan - Aug 25
QA MeetUp Yerevan - Aug 25QA MeetUp Yerevan - Aug 25
QA MeetUp Yerevan - Aug 25Sargis Sargsyan
 

Más de Sargis Sargsyan (13)

Let’s Talk About Quality Engineering
Let’s Talk About Quality EngineeringLet’s Talk About Quality Engineering
Let’s Talk About Quality Engineering
 
Your Road to Quality Assurance
Your Road to Quality AssuranceYour Road to Quality Assurance
Your Road to Quality Assurance
 
Getting Started with Dockerization of Selenium Tests Execution - Testwarez 2019
Getting Started with Dockerization of Selenium Tests Execution - Testwarez 2019Getting Started with Dockerization of Selenium Tests Execution - Testwarez 2019
Getting Started with Dockerization of Selenium Tests Execution - Testwarez 2019
 
How to Dockerize Parallel Execution of Selenium Tests - SQA Days EU, Rgia, La...
How to Dockerize Parallel Execution of Selenium Tests - SQA Days EU, Rgia, La...How to Dockerize Parallel Execution of Selenium Tests - SQA Days EU, Rgia, La...
How to Dockerize Parallel Execution of Selenium Tests - SQA Days EU, Rgia, La...
 
Easy Setup for Parallel Test Execution with Selenium Docker
Easy Setup for Parallel Test Execution with Selenium DockerEasy Setup for Parallel Test Execution with Selenium Docker
Easy Setup for Parallel Test Execution with Selenium Docker
 
Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA...
Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA...Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA...
Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA...
 
Test Data Preparation: Tips and Tricks - SQA Days 22 - Saint Petersburg
Test Data Preparation: Tips and Tricks - SQA Days 22 - Saint PetersburgTest Data Preparation: Tips and Tricks - SQA Days 22 - Saint Petersburg
Test Data Preparation: Tips and Tricks - SQA Days 22 - Saint Petersburg
 
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...
 
Better Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component PatternBetter Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component Pattern
 
Agile Testing
Agile TestingAgile Testing
Agile Testing
 
Selenium Testing on Chrome - Google DevFest Armenia 2015
Selenium Testing on Chrome - Google DevFest Armenia 2015Selenium Testing on Chrome - Google DevFest Armenia 2015
Selenium Testing on Chrome - Google DevFest Armenia 2015
 
Web Application Testing with Selenium
Web Application Testing with Selenium Web Application Testing with Selenium
Web Application Testing with Selenium
 
QA MeetUp Yerevan - Aug 25
QA MeetUp Yerevan - Aug 25QA MeetUp Yerevan - Aug 25
QA MeetUp Yerevan - Aug 25
 

Último

Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfRagavanV2
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdfSuman Jyoti
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
Intro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdfIntro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdfrs7054576148
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 

Último (20)

(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdf
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
Intro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdfIntro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdf
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 

Run your Appium tests using Docker Android - AppiumConf 2019

  • 1. 1 Run your Appium tests using Docker Android Sargis Sargsyan
  • 2. 2 Sargis Sargsyan Director, Quality Assurance at PicsArt Inc Welcome!
  • 3. 3 Introduction Getting started with Appium Docker for Android Appium Docker Setup docker-appium in Mac Agenda Appium Dockerization: from scratch to advanced implementation
  • 4. 4 Run Tests on Real Device Run Android test suite on real devices using Appium Docker Setup Using Docker Compose Faster setup with docker- compose Android Emulator in Docker Setup android emulator with docker SMS Simulation Simulate receiving SMS
  • 5. 5 Selenium Hub Introduction to Selenium Hub Connect Appium host to Hub Register Appium host in Selenium grid Run Tests in Emulator Running Appium test in Emulator Q&A
  • 7. 7 Quick & easier setup of automation environment Speed up Appium test suite run The automation setup steps will be done Automatically Run on Real Devices and Emulators Why we need this approach
  • 8. 8 What is Appium? Appium is a powerful framework that help us test our mobile applications It supports both native and hybrid applications It is open-source and cross-platform, giving us the ability to run test against multiple platforms with the same API, avoiding code refactoring It’s drive iOS , Android and Windows apps using the WebDriver protocol
  • 9. 9 Appium Architecture How Appium is working Test Runner Appium ADB Appium ADB HTTP USB connect USB connect
  • 10. 10 Appium Docker Architecture Test Runner HTTP USB connect USB connect Appium ADB Appium ADB docker-machine-1 docker-machine-2
  • 11. 11 Getting started with docker-appium Steps for Mac OSX
  • 13. 13
  • 14. 14 $ docker-machine create --driver virtualbox appium-test-machine Create a docker-machine
  • 15. 15
  • 16. 16
  • 17. 17 $ docker-machine stop appium-test-machine Enable USB in created docker-machine
  • 18. 18
  • 19. 19 $ vboxmanage modifyvm appium-test-machine --usb on --usbehci on Enable USB in created docker-machine * You need to install Extension Pack depends on your virtualbox version, in case you get an Error "Implementation of the USB 2.0 controller not found"
  • 20. 20
  • 21. 21
  • 22. 22 $ docker-machine start appium-test-machine Start docker-machine
  • 23. 23
  • 24. 24 Add Android device and Host Controller
  • 25. 25 $ adb kill-server Kill base machine adb
  • 26. 26
  • 27. 27 $ docker-machine ssh appium-test-machine SSH to docker-machine
  • 28. 28
  • 29. 29 $ docker exec -it container-appium adb devices Connect the device and run
  • 30. 30
  • 31. 31 On the mobile you should see this dialog
  • 32. 32 $ docker run --privileged -d -p 4723:4723 -v /dev/bus/usb:/dev/bus/usb --name container-appium appium/appium Run Appium-docker in the docker-machine
  • 33. 33
  • 34. 34 $ docker cp <path>/picsart.apk container-appium:/opt Copy Application to Container
  • 35. 35
  • 36. 36
  • 37. 37 Register in Selenium Grid Appium-Docker-Android can be connected with Selenium Grid You just need to pass the following paraments CONNECT_TO_GRID=true APPIUM_HOST=<appium_server_host> APPIUM_PORT=<appium_server_port> SELENIUM_HOST=<selenium_hub_host> SELENIUM_PORT=<selenium_hub_port>
  • 38. 38 $ docker run --privileged -d -p 4723:4723 -e CONNECT_TO_GRID=true -e APPIUM_HOST="127.0.0.1" -e APPIUM_PORT=4723 -e SELENIUM_HOST="172.17.0.1" -e SELENIUM_PORT=4444 -v /dev/bus/usb:/dev/bus/usb --name container-appium appium/appium The command will look like
  • 40. 40 $ docker-compose up -d Run with docker-compose
  • 42. 42 Connect device via Wi-Fi Set the target device to listen for a TCP/IP connection on port 5555. adb tcpip 5555 Connect to the device by its IP address adb connect <ip-of-mobile-device> Confirm that your host computer is connected to the target device adb devices
  • 43. 43
  • 44. 44
  • 46. 46 Why? What are the Purposes of Docker Android Run UI tests for mobile websites with Appium Build Android project and run unit tests with the latest build-tools Run UI tests for Android applications with different frameworks (appium, espresso, robotium, etc.) Run monkey / stress tests *https://github.com/budtmo/docker-android SMS testing
  • 47. 47 Advantages What are the Advantages of Docker Android noVNC to see what happen inside docker container Ability to connect to Selenium Grid Support real devices with screen mirroring Ability to record video during test execution for debugging *https://github.com/budtmo/docker-android Integrated with other cloud solutions, e.g. Genymotion Cloud OPEN SOURCE!
  • 48. 48 Supported Devices Nexus 5 Nexus OneNexus 4 Samsung Galaxy S6 Samsung Galaxy S7 Edge Samsung Galaxy S7 Nexus 7 Nexus S
  • 49. 49 $ docker run --privileged -d -p 6080:6080 -p 5554:5554 -p 5555:5555 -e DEVICE="Samsung Galaxy S6" --name android-container budtmo/docker-android-x86-8.1 Getting started! Running Samsung Galaxy S6 Emulator
  • 50. 50
  • 51. 51
  • 52. 52 $ docker run --privileged -d -p 6080:6080 -p 5554:5554 -p 5555:5555 -p 4723:4723 --name android-container-appium budtmo/docker-android- real-device Control Real Device Connected to the Host
  • 53. 53 $ adb -H host.docker.internal -P 5037 devices Connect to ADB of the Host
  • 55. 55 SMS Simulation Find the auth_token and copy it. docker exec -it android-container cat /root/.emulator_console_auth_token Access emulator using telnet and login with auth_token telnet <docker-machine-ip-address> 5554 Login with auth_token auth <auth_token> Send the sms sms send <phone_number> <message>
  • 56. 56
  • 59. 59 $ docker run -d -p 4444:4444 -v /dev/shm:/dev/shm selenium/hub:3.14.0-curium Run Selenium Grid in Docker
  • 60. 60
  • 61. 61 Let’s combine all these solutions Appium Docker Emulator Selenium Grid
  • 62. 62
  • 63. 63
  • 64. 64
  • 65. 65
  • 66. 66
  • 67. 67 Thank You Feel free to Contact me!