ppodgorsek / docker-robot-framework

Robot Framework in Docker
https://cloud.docker.com/repository/docker/ppodgorsek/robot-framework
MIT License
333 stars 235 forks source link

Variables from variablefile passed in options are not reconized #345

Open rkefi84 opened 3 years ago

rkefi84 commented 3 years ago

Describe the bug I user variable files in my project to separate environments data and then pass it as arguments to the runner.

My command looks like this :

docker run \ -v $TEST_PATH/Reports:/opt/robotframework/reports:Z \ -v $TEST_PATH:/opt/robotframework/tests:Z \ -e BROWSER=firefox \ -e ROBOT_OPTIONS="--variablefile Config/dev-data.py" \ -e ROBOT_OPTIONS="--include myTag" \ ppodgorsek/robot-framework:latest

I see the the option specifying the tag is being taken into account and working as expected but then the tests starts and fails immediately, complaining about the variables not found. These variables comes from the variable file

To Reproduce Steps to reproduce the behavior: Add a variable file under a folder which is at the same level with the tests folder Include a variable that you call in your test Run the test againt the docker image using the option --variablefile

Expected behavior Variables in variablefille should be reconized

Robot template Any Robot template which could help reproduce the issue.

Screenshots If applicable, add screenshots to help explain your problem.

Please provide any relevant information, such as:

Additional context Add any other context about the problem here.

UltimateDogg commented 3 years ago

The variable files in robot framework follow the rules here https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#resource-and-variable-files

If you want to try testing, use the absolute path and it should work