Android in docker solution with noVNC supported and video recording
Find a file
2017-02-27 14:53:48 +01:00
browser_apk Moved browser apks from folder example 2017-02-27 13:48:02 +01:00
example Moved browser apks from folder example 2017-02-27 13:48:02 +01:00
images Updated README.md 2017-01-08 17:24:38 +01:00
skins Refactored code, added log and emulator skins 2017-02-27 14:53:48 +01:00
src Refactored code, added log and emulator skins 2017-02-27 14:53:48 +01:00
.gitignore First commit 2016-12-22 14:29:57 +01:00
.travis.yml First commit 2016-12-22 14:29:57 +01:00
Dockerfile Refactored code, added log and emulator skins 2017-02-27 14:53:48 +01:00
LICENSE First commit 2016-12-22 14:29:57 +01:00
MAINTAINERS First commit 2016-12-22 14:29:57 +01:00
README.md Added codacy badge 2017-02-11 23:37:27 +01:00
requirements.txt First commit 2016-12-22 14:29:57 +01:00
setup.cfg Refactored code, added log and emulator skins 2017-02-27 14:53:48 +01:00
supervisord.conf Refactored code, added log and emulator skins 2017-02-27 14:53:48 +01:00

Docker-Android-Appium

Build Status codecov Codacy Badge

Android emulator and Appium server in docker solution with noVNC supported.

Requirements

Docker is installed in your system.

Features

  1. Android emulator
  2. noVNC
  3. Appium server
  4. Able to connect to selenium grid
  5. Browser application for mobile website testing
  • Chrome version 55 (for x86 and armeabi)
  • Firefox version 51 (for x86 and armeabi)

Quick Start

  1. Enable Virtualization under System Setup in BIOS. (It is only for Ubuntu OS. If you use different OS, you can skip this step).

  2. Run docker-appium with command:

    docker run -d -p 6080:6080 -p 4723:4723 -v <path_of_apk_that_want_to_be_tested>:/target_apk -e ANDROID_VERSION=<target_android_version> -e EMULATOR_TYPE=<emulator_type> -e CONNECT_TO_GRID=<True/False> --name appium-container butomo1989/docker-appium
    

    An Example:

    docker run -d -p 6080:6080 -p 4723:4723 -v $PWD/example/sample_apk:/target_apk -e ANDROID_VERSION=4.2.2 -e EMULATOR_TYPE=armeabi -e CONNECT_TO_GRID=False --name appium-container butomo1989/docker-appium
    

Optional arguments for CONNECT_TO_GRID=True

-e APPIUM_HOST="<host_ip_address>": if appium is running under different host. default value: 127.0.0.1
-e APPIUM_PORT=<port_number>: if appium is running under different port. default port: 4723
-e SELENIUM_HOST="<host_ip_address>": if selenium hub is running under different host. default value: 172.17.0.1
-e SELENIUM_PORT=<port_number>: if selenium hub is running under different port. default port: 4444

Note: use flag --privileged and EMULATOR_TYPE=x86 for ubuntu OS to make emulator faster

  1. Verify the ip address of docker-machine.

    • For OSX, you can find out by using following command:

      docker-machine ip default
      
    • For different OS, localhost should work.

  2. Open http://docker-machine-ip-address:6080/vnc.html from web browser and connect to it without password.

  3. Wait until the installation of selected android version packages is done and appium is ready to use by waiting following message shown in Terminal:

    The name of created emulator can be seen in that terminal. In screenshot above, the emulator name is emulator_4.2.2.

  4. Run your UI tests by using docker-appium and Android emulator will be started automatically by following desire capability:

    desired_caps = {
       'avd': 'emulator_4.2.2'
    }
    

Note: In folder "example" there is an example of Appium-UITest that is written in python.