written some keywords using robot framework and user should not see my implemented keywords and he needs to call it in test case for execution is this possible?
Is there any way to hide the implementation of custom keywords from user in robot framework
Never done this myself, but would you be looking at wanting to create your own PyPI package?
Other than that, I don’t really see the risk around testers seeing the implementation behind a keyword, if you’re worried of change to the keywords you can put the project in some form if source control.
But maybe there is a way to lock them down completely, can’t say I’ve really had a need or explored this.
Robot Framework is an interpreted language where the interpreter is written in Python, which is also an interpreted language by design.
So if your custom keyword library is in the form of a robot framework resource file of robot framework keywords then probably not.
If your custom keyword library is in the form of a python keyword library you might be able to apply one of the options in this stackoverflow thread:
- Another option might be to create a dll using another programming language, then create a python wrapper keyword library that calls the functions in the dll see ctypes in Supported programming languages
I have no experience with any of this, as all my publicly available code is open source, so hopefully I’m pointing you in the right direction,
Nice one Dave, pyInstaller didn’t even cross my mind for which I use with another project and have looked into a few others in that link you provided.
Not fun trying to decompile…
Just a heads up incase you fall upon using pyInstaller, the log, html files/folders for the reporting won’t be included in the output folder as well as other folder/files.
might save you some debugging time with the reporting one, if you was to use that approach, you’d just want to include them yourself by telling pyInstaller or just manually coping them across.
All the best