Robot Framework Remote Server
raw JSON → 1.1.1 verified Fri May 01 auth: no python
A Python implementation of Robot Framework remote server, allowing Robot Framework to connect to remote libraries via XML-RPC. Current version 1.1.1, maintained by the Robot Framework project. Releases are infrequent.
pip install robotremoteserver Common errors
error ModuleNotFoundError: No module named 'robotremoteserver' ↓
cause RobotRemoteServer package not installed.
fix
pip install robotremoteserver
error AttributeError: 'RemoteServer' object has no attribute 'serve' ↓
cause Using old API where serve() was named start().
fix
Call server.serve() instead of server.start().
error xmlrpc.client.Fault: <Fault 1: "<class 'Exception'>: library initialization failed"> ↓
cause Exception raised during library instantiation inside RemoteServer.
fix
Ensure library init does not raise exceptions.
Warnings
gotcha Default timeout for XML-RPC can cause hangs if library method takes long. Set timeout parameter in RemoteServer or client side. ↓
fix server = RemoteServer(library, port=8270, xmlrpc_timeout=60)
gotcha Remote server logs must be enabled explicitly. By default no logs are written. ↓
fix import logging; logging.basicConfig(level=logging.INFO) before serve()
breaking Python 2 support dropped in version 1.0.0. Python 3.6+ required. ↓
fix Upgrade to Python 3.6+.
Imports
- RemoteServer
from robotremoteserver import RemoteServer
Quickstart
from robotremoteserver import RemoteServer
class MyLibrary:
def say_hello(self, name):
return f"Hello, {name}!"
if __name__ == '__main__':
server = RemoteServer(MyLibrary())
server.serve()