New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON variable file support #4532
Comments
Adding support for JSON variable files wouldn't be too complicated. It would have a benefit that Python has a built-in The reason I don't consider this super important is that you can already now pretty easily use JSON files as variable files. You can, for example, create a generic Python variable file that loads the JSON file. My understanding is that can also losslessly convert between JSON and YAML, so you could convert your JSON file to YAML before running Robot. It could even possible that just renaming your |
Is anyone working on this. |
Thanks for a great PR @sunday2! Sorry for the review taking so long. There were few simple changes to be done to code and tests. I hope you can take a look at them, but I can also merge the PR as-is and make changes myself. Another thing to do is writing documentation. |
Thank you for the review and all the comments, I have updated the code and pls help review again. |
Implements #4532. Documentation still missing.
If you want to see how the documentation actually looks, you can generate the User Guide locally with this command:
If you see a typo or have enhancement ideas, just comment here or create another PR. |
Thank you for the help, that's helpful. |
Implements #4532. Documentation still missing.
Problem
robot --variablefile burek.json -i smoke ROBOT/
returns the following error:failed: Importing variable file ’burek.json’ failed: Not a valid file or directory to import.
while
burek.py
containing the same JSON content seem to work just fine.--variablefile (-V)
only seems to support Python and YAML file types.We would like to use JSON file as a variablefile to pass on certain variables that are used by other frameworks as well.
Thanks for all the help!
The text was updated successfully, but these errors were encountered: