'Loading Robot Resource files from Python package
I have a number of teams working in Robot in separate repositories, and want to make available a set of common Python and Robot code to avoid duplication. I've pulled out the .py and .robot files that I want to package, have built the package (making sure that the .robot files are present in the .tar.gz), and have published it to our local artifactory. When I go to use these files in Robot tests, however, I can successfully use the .py files with the
Library package.module
syntax.
However using Robot resources with the
Resource package.resource.robot
syntax fails. Is there some way to include and utilize .robot resources in a python package?
Solution 1:[1]
Loading rf resource files from python packages is not supported by Robot Framework out of the box.
I wrote a blogpost about this few years ago: http://rasjani.github.io/2020/01/05/bundle-resources.html - and there's also a proof of concept library that's implementing the idea from the post here: https://github.com/rasjani/robotframework-importresource
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | rasjani |
