Compare commits

..
6 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
2 changed files with 19 additions and 13 deletions
+5 -1
View File
@@ -118,7 +118,7 @@ RUN npm install -g appium@$APPIUM_VERSION && npm cache clean
# Install SDK packages # Install SDK packages
#====================== #======================
ARG ANDROID_VERSION=5.0.1 ARG ANDROID_VERSION=5.0.1
ARG BUILD_TOOL=21.1.2 ARG BUILD_TOOL=25.0.3
ARG API_LEVEL=21 ARG API_LEVEL=21
ARG PROCESSOR=x86 ARG PROCESSOR=x86
ARG SYS_IMG=x86_64 ARG SYS_IMG=x86_64
@@ -175,4 +175,8 @@ COPY devices /root/devices
COPY src /root/src COPY src /root/src
COPY supervisord.conf /root/ COPY supervisord.conf /root/
RUN chmod -R +x /root/src && chmod +x /root/supervisord.conf 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 CMD /usr/bin/supervisord --configuration supervisord.conf
+14 -12
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) [![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) [![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 Samsung Device | Google Device
:---------------------------:|:---------------------------: :---------------------------:|:---------------------------:
@@ -13,20 +13,20 @@ Samsung Device | Google Device
Purpose Purpose
------- -------
1. Build android project and run unit test inside container 1. Run UI tests for mobile websites with ([appium])
2. Run UI Test for mobile application with different frameworks (appium, espresso, etc.) 2. Build Android project and run unit tests with the latest build-tools
3. Run UI Test for mobile website with appium test framework 3. Run UI tests for Android applications with different frameworks ([appium], [espresso], [robotium], etc.)
4. Video recording to analyse failing test cases ***(soon)*** 4. Run monkey / stress tests
5. Monkey test for stress test ***(soon)*** 5. SMS testing
Advantages compare with other docker-android projects Advantages compare with other docker-android projects
----------------------------------------------------- -----------------------------------------------------
1. noVNC to see what happen inside docker container 1. noVNC to see what happen inside docker container
2. Android emulator that facilitates different devices 2. Emulator for different devices / skins, such as Samsung Galaxy S6, LG Nexus 4, HTC Nexus One and more.
3. Able to connect with selenium grid 3. Ability to connect to Selenium Grid
4. Able to control emulator from outside container by using adb connect 4. Ability 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)*** 5. Open source with more features coming (monkey test, support real devices with screen mirroring and video recording)
List of Docker images List of Docker images
--------------------- ---------------------
@@ -113,7 +113,7 @@ It is also possible to connect appium server that run inside docker-android with
- SELENIUM_PORT=\<port\_number> - SELENIUM_PORT=\<port\_number>
```bash ```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 ### Share Volume
@@ -121,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***. 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 ```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 Control android emulator outside container
@@ -182,6 +182,8 @@ docker exec -it android-container tail -f /var/log/supervisor/docker-android.std
``` ```
[appium]: <https://appium.io> [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 samsung]: <images/docker_android_samsung.png>
[docker android nexus]: <images/docker_android_nexus.png> [docker android nexus]: <images/docker_android_nexus.png>
[selenium grid]: <images/selenium_grid.png> [selenium grid]: <images/selenium_grid.png>