Public Repository

Last pushed: 2 years ago
Short Description
Image containing robot framework, chrome, firefox and useful robot libraries
Full Description

FROM fedora:21



System pre requirements

RUN yum update -y

RUN yum install -y wget \
sudo \
tar \
bzip2 \
python-pip \
ssh \
openssh-server \
openssl-devel \
unzip \
numpy \
tesseract \
python-devel \
libffi-devel \
gcc \
xorg-x11-server-Xvfb \
ratpoison \
xset \
firefox \
yum clean all

Install selenium chrome driver

RUN wget
RUN unzip -d /usr/bin/
RUN rm

Install Robot Framework and libraries

RUN pip install --upgrade virtualenv
RUN pip install robotframework robotframework-selenium2library robotframework-sshlibrary robotframework-appiumlibrary robotframework-faker

Install Selenium

RUN pip install -U selenium

Install maven

RUN wget
RUN tar xvf apache-maven-3.3.9-bin.tar.gz -C /usr/local/
RUN rm apache-maven-3.3.9-bin.tar.gz

Install Oracle Java JDK

RUN wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie"
RUN rpm -i jdk-8u92-linux-x64.rpm
RUN rm jdk-8u92-linux-x64.rpm

COPY ./docker-resources/ ${WORKDIR}

Compile and install robot framework sikuli library

RUN /usr/local/apache-maven-3.3.9/bin/mvn clean package
RUN python install

Install google chrome

RUN mv ${WORKDIR}/google-chrome.repo /etc/yum.repos.d/
RUN yum install -y google-chrome-stable
RUN rm -rf assembly.xml build lib pom.xml src target
RUN mkdir robot
RUN chmod 755

How to execute build and run

The first thing you need to do is building the image and then run a container based on that image

Command Description
sudo docker build -t ${robot-image-name} . Build a new robot image
sudo docker run --net host --rm -v ${workspace}:/home/robot -i -t ${robot-image} ./ ${server} ${path-to-test} ${included-tag-test} ${excluded-tag-test} ${browser} ${browser-2} Execute functional test according to the following parameters: ${include-tag-test} execute test with this tag, ${excluded-tag-test} exclude test with this tag, ${server} is the main URL, ${browser} is the browser used to execute the test (chrome or firefox), ${browser-2} is the 2nd browser used during the test and ${path-to-test} is the path to one specific test or suite to be executed
Docker Pull Command