Hi,
I am learning docker and if I may say, I would like to say that the Docker for absolute Beginner video has been awesome. The method used is indeed an eye-opener. I have this challenge that I am struggling to solve. I have automated a mobile script in Robot Framework and I have followed the methods in the video. Right now, I haven’t created the Dockerfile, I have entered the terminal of the base image using docker run -it python:3.7-stretch
I have been able to create my work space inside and even create a virtual environment inside. I have installed the Robot Framework appium library. My only challenge is installing appium, and the android SDK manager and starting both so that the script can be executed right inside the base image. how do achieve this?
Ayman
March 13, 2021, 3:12pm
#2
hello @bhadmus ,
please follow the tutorial in the following link to solve the problem:
# Introduction
In this tutorial, I am going to explain how you can dockerize your [Appium](http://appium.io/) automated tests without any pain. I believe that you have a fair experience in writing Appium tests and at least know a little about [Docker](https://www.docker.com/). Even if you don't know anything about these tools and follow all the instructions, you will still be able to run sample demo tests in docker container.
**NOTE: If you are too lazy to read the whole document and just wanna see how it works, you can check [Easy Setup](./docs/EASY_SETUP.md). But don't forget to come back here.**
Below, I am going to write a very brief introduction about appium and docker, if you already know them, feel free to skip this part and directly go to the next section.
## What is Appium?
Appium is an automation test framework for native, hybrid and mobile web apps. It uses [WebDriver](http://www.seleniumhq.org/projects/webdriver/) protocol for its apis, so people with [Selenium](http://www.seleniumhq.org/) background can easily start writing mobile tests using it. It also provides various client libraries in different languages, so you can choose anyone of your choice. You can read more about it [here](http://appium.io/tutorial.html).
## What is docker?
Docker helps you in containerising your application or any piece of code likes UI tests. It guarantees that it will always run the same, regardless of the environment it is running in. One of the biggest advantage of using this is that, it is very light weight. You can run multiple containers in the same machine without much overload because of docker. You can read more about it at [docker's home page](https://www.docker.com/). It has very good [tutorials](https://docs.docker.com/) for beginners.
# Why should I Dockerize my tests?
As soon as you start writing appium tests and as soon as tests start growing, you will realise that mobile tests take so much time compare to browser tests. And there are so many devices and OS Versions to cover. The only way to reduce run time is by parallelisation. Many people are doing this by using Virtual Machines but that is much heavier and slower compare to Docker.If you use docker, you can run test parallel very easily and fast. All you need to do is launch a new container which is only a single command. Rest docker will take care.
One more big advantage of using docker is that, you don't need to worry about your environment. Node version, Appium version, client language version etc etc. If your docker image is correct, it will run same on any machine.
# About this repository
This file has been truncated. show original