Compare commits

...
11 Commits
11 changed files with 29 additions and 16 deletions
+4 -6
View File
@@ -10,10 +10,6 @@
Docker-Android is a docker image built to be used for everything related to mobile website testing and Android project.
<p align="center">
<a href="https://youtu.be/pQdpjuYwvp8"><img src="./images/appiumconf2018.png" alt="Appium Conference 2018" width="600"></a>
</p>
Emulator - Samsung Device | Emulator - Nexus Device | Real Device
:---------------------------:|:---------------------------:|:---------------------------:
![][emulator samsung] |![][emulator nexus] |![][real device]
@@ -192,9 +188,11 @@ This [document](README_CLOUD.md) contains information about deploying Docker-And
Genymotion
----------
![Genymotion](images/logo_genymotion.png)
<p align="center">
<img id="geny" src="./images/logo_genymotion_and_dockerandroid.png" />
</p>
For you who do not have ressources to maintain the simulator or to buy machines or need different device profiles, you need to give a try to [Genymotion Cloud](https://www.genymotion.com/cloud/). Docker-Android is integrated with Genymotion on different cloud services, e.g. Genymotion Cloud, AWS, GCP, Alibaba Cloud. Please follow [this document](README_GENYMOTION.md) for more detail.
For you who do not have ressources to maintain the simulator or to buy machines or need different device profiles, you need to give a try to [Genymotion Cloud](https://www.genymotion.com/cloud/). Docker-Android is integrated with Genymotion on different cloud services, e.g. Genymotion Cloud, AWS, GCP, Alibaba Cloud. Please follow [this document](README_GENYMOTION.md) or [this blog](https://medium.com/genymobile/run-your-appium-tests-using-docker-android-genymotion-cloud-e4817132ccd8) for more detail.
Troubleshooting
---------------
+3 -1
View File
@@ -1,6 +1,8 @@
Genymotion Cloud
----------------
![Genymotion](images/logo_genymotion.png)
You can easily scale your Appium tests on Genymotion Android virtual devices in the cloud. They are available on SaaS or as virtual images on AWS, GCP or Alibaba Cloud.
1. On SaaS <br />
@@ -11,7 +13,7 @@ You can easily scale your Appium tests on Genymotion Android virtual devices in
export PASS="xxx"
export LICENSE="xxx"
docker run -it --rm -p 4723:4723 -v $PWD/genymotion/example/sample_devices:/root/tmp -e TYPE=genycloud -e USER=$USER -e PASS=$PASS -e LICENSE=$LICENSE butomo1989/docker-android-genymotion
docker run -it --rm -p 4723:4723 -v $PWD/genymotion/example/sample_devices:/root/tmp -e TYPE=SaaS -e USER=$USER -e PASS=$PASS -e LICENSE=$LICENSE butomo1989/docker-android-genymotion
```
<p align="center">
+1 -1
View File
@@ -1,4 +1,4 @@
FROM appium/appium:1.9.1-p0
FROM appium/appium:1.10.0-p0
LABEL maintainer "Budi Utomo <budi.ut.1989@gmail.com>"
+1 -1
View File
@@ -1,4 +1,4 @@
FROM appium/appium:1.9.1-p0
FROM appium/appium:1.10.0-p0
LABEL maintainer "Budi Utomo <budi.ut.1989@gmail.com>"
+1 -1
View File
@@ -1,4 +1,4 @@
FROM appium/appium:1.9.1-p0
FROM appium/appium:1.10.0-p0
LABEL maintainer "Budi Utomo <budi.ut.1989@gmail.com>"
+2 -2
View File
@@ -11,7 +11,7 @@ services:
- 4444:4444
# Please stop this container by using docker stop instead of docker-compose stop
cloud:
saas:
image: butomo1989/docker-android-genymotion
depends_on:
- selenium_hub
@@ -20,7 +20,7 @@ services:
- $PWD/sample_apk:/root/tmp/sample_apk
- $PWD/sample_devices:/root/tmp
environment:
- TYPE=genycloud
- TYPE=SaaS
- TEMPLATE=/root/tmp/devices.json
- USER=$USER
- PASS=$PASS
+1 -1
View File
@@ -32,7 +32,7 @@
},
{
"from_port": 51000,
"to_port": 51000,
"to_port": 51100,
"protocol": "tcp",
"cidr_blocks": "0.0.0.0/0"
},
+1 -1
View File
@@ -1,7 +1,7 @@
#!/bin/bash
# This script is needed because of https://www.ctl.io/developers/blog/post/gracefully-stopping-docker-containers/
types=(genycloud aws)
types=(saas aws)
if [ -z "$TYPE" ]; then
echo "Please specify one of following types: ${types[@]}"
Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

+2 -2
View File
@@ -261,7 +261,7 @@ _EOF
echo "Connect to adb remotely"
for ((i=index;i>=1;i--)); do
dns=$(./terraform output public_dns_$i)
((sleep ${interval_sleep} && adb connect localhost:${port}) > /dev/null & ssh -i ~/.ssh/id_rsa -oStrictHostKeyChecking=no -q -NL ${port}:localhost:5555 shell@${dns}) &
((sleep ${interval_sleep} && adb connect localhost:${port}) > /dev/null & ssh -i ~/.ssh/id_rsa -o ServerAliveInterval=60 -o StrictHostKeyChecking=no -q -NL ${port}:localhost:5555 shell@${dns}) &
((port--))
time_sleep=$((time_sleep+interval_sleep))
done
@@ -321,7 +321,7 @@ elif [ "$GENYMOTION" = true ]; then
echo "${types[@]}"
case $TYPE in
"${types[0]}" )
echo "Using Genymotion-Cloud"
echo "Using Genymotion-Cloud (SaaS)"
prepare_geny_cloud
run_appium
;;
+13
View File
@@ -64,6 +64,19 @@ class TestApp(TestCase):
self.assertTrue(mocked_subprocess.called)
self.assertTrue(mocked_appium.called)
@mock.patch('src.app.prepare_avd')
@mock.patch('builtins.open')
@mock.patch('subprocess.Popen')
def test_run_with_appium_and_relaxed_security(self, mocked_avd, mocked_open, mocked_subprocess):
with mock.patch('src.app.appium_run') as mocked_appium:
os.environ['APPIUM'] = str(True)
os.environ['RELAXED_SECURITY'] = str(True)
app.run()
self.assertTrue(mocked_avd.called)
self.assertTrue(mocked_open.called)
self.assertTrue(mocked_subprocess.called)
self.assertTrue(mocked_appium.called)
@mock.patch('src.app.prepare_avd')
@mock.patch('builtins.open')
@mock.patch('subprocess.Popen')