This project consists of a Docker image containing RPA Framework package.
This image also contains Chrome and its equivalant driver. The resources, test cases and reports should be mounted as volumes.
The versions used are:
- RPA Framework
- Google Chrome 108.0.5359.124-1
- Chrome Driver 108.0.5359.71
Pull the image :
docker pull hajare/rpa-chrome
After pulling the image, run the container using the following command:
docker run \
-v <path to the resources folder>:/resources \
-v <path to the tests folder>:/tests \
-v <path to results folder>:/results \
--rm hajare/rpa-chrome \
bash -c "robot tests/" \
--outputdir /results /tests/
Changing versions of both chrome and chrome driver can be easily done by passing the values at build-time of the Dockerfile:
--build-arg CHROME_VERSION=<VERSION> \
--build-arg DRIVER_VERSION=<VERSION>
Available Chrome and Chrome Driver versions:
-
Add the following lines at the end of the Dockerfile
COPY requirements.txt . RUN pip install requirements.txt ENTRYPOINT ["robot"]
-
Build the new docker image
docker build -t <name:tag> .
-
Run the container
docker run \ -v <path to the resources folder>:/resources \ -v <path to the tests folder>:/tests \ -v <path to results folder>:/results \ --rm <name:tag> \ --outputdir /results /tests/
This image can be used in GitHub actions and GitLab CI/CD as follows:
-
GitLab : .gitlab-ci.yml
image: hajare/rpa-chrome test: stage: test script: - robot tests/
-
GitHub : main.yml
jobs: test: runs-on: ubuntu-latest container: hajare/rpa-chrome:latest steps: - uses: actions/checkout@v2 - name: Run RobotFramework tests run: | robot tests/