Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/spirosstyliaras/robotframework-docker
- Owner: SpirosStyliaras
- License: mit
- Created: 2023-10-26T16:25:39.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-26T22:55:36.000Z (about 1 year ago)
- Last Synced: 2024-11-01T15:44:00.512Z (about 2 months ago)
- Topics: docker, dockerfile, robotframework
- Language: Dockerfile
- Homepage:
- Size: 21.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```