This document discusses using Appium and Docker together for mobile UI testing on Android. It provides an introduction to Appium and Docker, explaining that Appium allows testing of native and hybrid mobile apps across platforms using WebDriver, while Docker provides lightweight containers to run testing environments and applications. It then demonstrates how to set up a Docker container with an Android environment and Appium server to run UI tests on an Android emulator with no local development environment required.
4. Table of contents
• Introduction
• 10 Tools Every Mobile Tester Should Know
• What is Appium?
• Appium Architecture
• Types of apps to be tested
• What is Docker?
• How Does it work ?
• Why combine these technologies?
• Run UI tests using DockerAndroid and Appium
6. Introduction
Why we develop apps for mobile devices ?
Why do we have to test apps?
7. Why we develop apps for mobile
devices ?
Since 2014 there are more mobile users than desktop ones
People buy more mobile devices than non mobile ones
8. Why do we have to test apps?
90 % of the time using apps vs. 10% using the browser.
Different OS (and also the same OS works different depending
on the version …).
Native VS. Hybrid apps.
11. 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
12. Appium Rules
• You shouldn't have to recompile or modify it in any way in
order to automate it.
• You shouldn’t be locked into a specific language or framework
to write and run your tests.
• A mobile automation framework shouldn’t reinvent the wheel
when it comes to automation APIs
• A mobile automation framework should be open source , in
spirit and practice as well as in name!
22. Appium Desktop
Appium Desktop is an open source app for Mac, Windows, and Linux which gives you the
power of the Appium automation server in a beautiful and flexible UI. It is a combination of a
few Appium-related tools:
A graphical interface for the Appium Server. You can set options, start/stop the server, see
logs, etc... You also don't need to use Node/NPM to install Appium, as the Node runtime
comes bundled with Appium Desktop.
An Inspector that you can use to look at your app's elements, get basic information about
them, and perform basic interactions with them. This is useful as a way to learn about
Appium or as a way to learn about your app so you can write tests for it.
26. What is Docker ?
You may think of Docker as a virtual machine, only much
lighter.
Docker is an open platform for developing and running
applications. With this tool, you can create ‘containers’ that
provide packages and commands isolated from your OS. This
allows you to run more than one container at the same time
on a single machine.
27. Containers are lightweight because they don’t need the extra load of a
hypervisor, but run directly within the host machine’s kernel. This
makes Docker more compatible than virtual machines.
31. Why combine these technologies?
If you are a QA and have nothing to do with development, setting the
environment to run the app (and the tests, which are our real goal) may be
tedious or complicated. For android, you must have an specific java version, an
android sdk, etc. And all that having in mind your OS and architecture.
That’s when Docker come to the rescue! a docker image to avoid these
inconveniences.
You only need Docker previously installed. https://docs.docker.com/engine/installation/
33. What is Docker-Android
A docker image built to be used for everything
related to mobile website testing and Android
project
34. Goals
Run UI test for mobile websites
Run UI tests for Android Applications
35. How Does It Work
Start docker-android
$ docker run --privileged -d -p 6080:6080 -p 4723:4723 -e DEVICE="Samsung Galaxy S6" -e
APPIUM=True -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 --
name android-container butomo1989/docker-android-x86-7.1.1
Start it with Appium server and connect to selenium grid
$ docker run --privileged -d -p 6080:6080 -e DEVICE="Samsung Galaxy S6" --name android-
container butomo1989/docker-android-x86-7.1.1
36. Live Demo
Let’s Play with
Docker-android and Appium
Visit https://github.com/butomo1989/docker-android
37. Key Advantages
noVNC
Emulator for different devices / skins,
such as Samsung Galaxy S6, LG Nexus
4, HTC Nexus One and more.
Ability to connect to Selenium Grid
Open source with more features coming
(video recording and logs, monkey test
and support real devices with screen
mirroring)