Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/spirosstyliaras/robotframework-docker

robotframework-docker
https://github.com/spirosstyliaras/robotframework-docker

docker dockerfile robotframework

Last synced: 10 days ago
JSON representation

robotframework-docker

Awesome Lists containing this project

README

        

Robot icon

# robotframework-docker

Common project for building Robot Framework docker image.

## Container environment variables and build arguments
We can customize the build process of the docker container image through a set of environment variables:
* `ROBOT_WORK_DIR` : The workspace of the container, the directory that contains the tests and generated reports.
* `ROBOT_TEST_FRAMEWORK_DIR` : The test cases directory. This is where we mount the test framework whose testcases are executed from the container.
* `ROBOT_LOGS_DIR` : The directory where test reports are saved.
* `ROBOT_USER` : Container user.
* `ROBOT_GROUP` : Container user's primary group.
* `ROBOT_USER_UID` : User ID.
* `ROBOT_GROUP_ID` : Group ID.

## Running the container
The execution of the robot binary through the container is parameterized with the following environment variables:
* `ROBOT_OPTIONAL_PARAMETERS` : Optional robot parameters like e.g. `--timestampoutputs --suitestatlevel`
* `ROBOT_LOG_LEVEL` : Logging level like e.g. `TRACE:DEBUG`
* `ROBOT_LOGS_DIR` : The directory where test reports are saved.
* `ROBOT_VARIABLES` : A set of variables or variable files.
* `ROBOT_TESTS` : The test cases executed. This variable can be initialized with any combination of `--test`, `--suite`, `--include` etc robot arguments.
* `ROBOT_SUITES` : The directory containing test suites (`.robot`) files.

This container can be run using the following command:

```sh
docker container run --rm -it -v :/opt/robotframework/testframework \
-v :/opt/robotframework/logs \
-e "PYTHONPATH=/opt/robotframework/testframework/libraries/" \
-e "ROBOT_LOG_LEVEL=TRACE:DEBUG" \
-e "ROBOT_VARIABLES=" \
-e "ROBOT_TESTS=" \
-e "ROBOT_SUITES=" \
robotframework-docker:latest
```