docker-robot-framework icon indicating copy to clipboard operation
docker-robot-framework copied to clipboard

Variables from variablefile passed in options are not reconized

Open rkefi84 opened this issue 4 years ago • 1 comments

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:

  • OS: [e.g. iOS] OSX Big Sur
  • Browser [e.g. chrome, safari] not browser related
  • Version [e.g. 22]

Additional context Add any other context about the problem here.

rkefi84 avatar Mar 23 '21 16:03 rkefi84

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

UltimateDogg avatar Mar 23 '21 16:03 UltimateDogg