Compare commits

...
9 Commits
Author SHA1 Message Date
butomo1989 8c4d947833 Updated README 2017-05-19 11:17:19 +02:00
butomo1989 80bbf1bd36 Using latest version of build-tool 2017-05-19 11:16:59 +02:00
butomo1989 f05d2564fa Added more timeout in health check to support arm docker image 2017-05-19 11:16:15 +02:00
budi utomoandGitHub 81e63fb88e Merge pull request #5 from andrcuns/container_health_check
Container health check based on Android Emulator boot completion
2017-05-15 16:15:23 +02:00
Andrejs Cunskis a7c9be6fc3 Container health check based on Android Emulator boot completion 2017-05-15 14:31:26 +03:00
budi utomoandGitHub 76393754fb Updated README.md 2017-05-04 16:32:01 +02:00
budi utomoandGitHub 10eb1b0d31 Merge pull request #3 from andrcuns/chrome_driver_fix
Fix chromedriver linux missing shared library libgconf-2.so.4 error
2017-05-04 10:23:41 +02:00
Andrejs Cunskis c3ad9b3d48 Fix chromedriver linux missing shared library libgconf-2.so.4 error 2017-05-04 01:29:41 +03:00
butomo1989 e2a0b7c840 Put only working devices 2017-04-26 16:34:27 +02:00
2 changed files with 22 additions and 19 deletions
+8 -1
View File
@@ -26,6 +26,8 @@ WORKDIR /root
# Web content engine (Fix issue in Android)
# socat
# Port forwarder
# libgconf-2-4
# Required package for chrome and chromedriver to run on Linux
#------------------
# NoVNC Packages
#------------------
@@ -60,6 +62,7 @@ RUN apt-get -qqy update && apt-get -qqy install --no-install-recommends \
openjdk-8-jdk \
libqt5webkit5 \
socat \
libgconf-2-4 \
xvfb \
x11vnc \
openbox \
@@ -115,7 +118,7 @@ RUN npm install -g appium@$APPIUM_VERSION && npm cache clean
# Install SDK packages
#======================
ARG ANDROID_VERSION=5.0.1
ARG BUILD_TOOL=21.1.2
ARG BUILD_TOOL=25.0.3
ARG API_LEVEL=21
ARG PROCESSOR=x86
ARG SYS_IMG=x86_64
@@ -172,4 +175,8 @@ COPY devices /root/devices
COPY src /root/src
COPY supervisord.conf /root/
RUN chmod -R +x /root/src && chmod +x /root/supervisord.conf
HEALTHCHECK --interval=2s --timeout=600s --retries=1 \
CMD adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done'
CMD /usr/bin/supervisord --configuration supervisord.conf
+14 -18
View File
@@ -4,7 +4,7 @@ Docker-Android
[![Build Status](https://travis-ci.org/butomo1989/docker-android.svg?branch=master)](https://travis-ci.org/butomo1989/docker-android)
[![codecov](https://codecov.io/gh/butomo1989/docker-android/branch/master/graph/badge.svg)](https://codecov.io/gh/butomo1989/docker-android)
Docker-Android is an android environment, an android emulator that facilitates different devices and [appium] in docker solution integrated with noVNC.
Docker-Android is a docker image built to be used for everything related to mobile website testing and Android project.
Samsung Device | Google Device
:---------------------------:|:---------------------------:
@@ -13,20 +13,20 @@ Samsung Device | Google Device
Purpose
-------
1. Build android project and run unit test inside container
2. Run UI Test for mobile application with different frameworks (appium, espresso, etc.)
3. Run UI Test for mobile website with appium test framework
4. Video recording to analyse failing test cases ***(soon)***
5. Monkey test for stress test ***(soon)***
1. Run UI tests for mobile websites with ([appium])
2. Build Android project and run unit tests with the latest build-tools
3. Run UI tests for Android applications with different frameworks ([appium], [espresso], [robotium], etc.)
4. Run monkey / stress tests
5. SMS testing
Advantages compare with other docker-android projects
-----------------------------------------------------
1. noVNC to see what happen inside docker container
2. Android emulator that facilitates different devices
3. Able to connect with selenium grid
4. Able to control emulator from outside container by using adb connect
5. It will have more important features for testing purpose like video recording and monkey test ***(soon)***
2. Emulator for different devices / skins, such as Samsung Galaxy S6, LG Nexus 4, HTC Nexus One and more.
3. Ability to connect to Selenium Grid
4. Ability to control emulator from outside container by using adb connect
5. Open source with more features coming (monkey test, support real devices with screen mirroring and video recording)
List of Docker images
---------------------
@@ -52,15 +52,9 @@ Type | Device Name
Phone | Samsung Galaxy S6
Phone | Nexus 4
Phone | Nexus 5
Phone | Nexus 5x
Phone | Nexus 6
Phone | Nexus 6P
Phone | Nexus One
Phone | Nexus S
Tablet | Pixel C
Tablet | Nexus 7
Tablet | Nexus 9
Tablet | Nexus 10
Requirements
------------
@@ -119,7 +113,7 @@ It is also possible to connect appium server that run inside docker-android with
- SELENIUM_PORT=\<port\_number>
```bash
docker run --privileged -d --rm -p 6080:6080 -p 4723:4723 -p 5554:5554 -p 5555:5555 -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
docker run --privileged -d -p 6080:6080 -p 4723:4723 -p 5554:5554 -p 5555:5555 -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
```
### Share Volume
@@ -127,7 +121,7 @@ docker run --privileged -d --rm -p 6080:6080 -p 4723:4723 -p 5554:5554 -p 5555:5
If you want to use appium to test UI of your android application, you need to share volume where the APK is located to folder ***/root/tmp***.
```bash
docker run --privileged -it --rm -p 6080:6080 -p 4723:4723 -p 5554:5554 -p 5555:5555 -v $PWD/example/sample_apk:/root/tmp -e DEVICE="Nexus 5" -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
docker run --privileged -d -p 6080:6080 -p 4723:4723 -p 5554:5554 -p 5555:5555 -v $PWD/example/sample_apk:/root/tmp -e DEVICE="Nexus 5" -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
```
Control android emulator outside container
@@ -188,6 +182,8 @@ docker exec -it android-container tail -f /var/log/supervisor/docker-android.std
```
[appium]: <https://appium.io>
[espresso]: <https://google.github.io/android-testing-support-library/docs/espresso/>
[robotium]: <https://github.com/RobotiumTech/robotium>
[docker android samsung]: <images/docker_android_samsung.png>
[docker android nexus]: <images/docker_android_nexus.png>
[selenium grid]: <images/selenium_grid.png>