mirror of
https://github.com/budtmo/docker-android.git
synced 2026-07-31 04:07:25 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8c4d947833 | ||
|
|
80bbf1bd36 | ||
|
|
f05d2564fa | ||
|
|
81e63fb88e | ||
|
|
a7c9be6fc3 | ||
|
|
76393754fb |
+5
-1
@@ -118,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
|
||||
@@ -175,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
|
||||
|
||||
@@ -4,7 +4,7 @@ Docker-Android
|
||||
[](https://travis-ci.org/butomo1989/docker-android)
|
||||
[](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
|
||||
---------------------
|
||||
@@ -113,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
|
||||
@@ -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***.
|
||||
|
||||
```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
|
||||
@@ -182,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>
|
||||
|
||||
Reference in New Issue
Block a user