robotframework/PythonRemoteServer

Support `@keyword` decorator

EddyPronk opened this issue · 3 comments

When I tried to use an existing class containing keywords in a RemoteServer I found out that the @Keyword decorator is not supported.

I'd be happy to help implementing this if we can discuss why the current implementation is not a true proxy.

see also:
robotframework/robotframework#2486

This is a good idea. Remote server doesn't really need to care about @keyword decorator, though, it only needs to check robot_name and robot_tags the decorator sets (and which can also be set otherwise). Implementation should basically contain two things:

  • If robot_name is set to any meaningful value (i.e. non-empty string), keyword name reported to Remote library should be set based on it.

  • Possible tags set with robot_tags should be added at the end of the keyword documentation using Tags: t1, t2, t2 syntax. This is needed because the dynamic API and the remote interface lack possibility to report keyword tags directly. Adding new get_keyword_tags method would be nice, but that is a separate task.

To learn more about the remote library interface implementation, please take a look at the docs in the User Guide:
http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#remote-library-interface

I implemented both now.

When a library imports robot.api.deco then test/libs/logging.py conflicts with the logging module of the standard library.

Follow the progress here:
https://github.com/epronk/PythonRemoteServer

PR #37 merged few fixes, cleanups done afterwards. I consider this issue done.

Thanks @epronk for the PR! Comment the commits above or add a note here if you see something suspicious in my changes.