robotframework-jsonrpcremote
A Robot Framework Remote Library implementation using JSON-RPC 2.0.
This project enables running Robot Framework keywords on a remote server using the standard JSON-RPC 2.0 protocol. It serves as an alternative to the standard Remote Library.
Features
- JSON-RPC 2.0: Built on the lightweight and widely supported standard protocol.
- Language Agnostic: Servers can be implemented in any language that supports JSON-RPC 2.0 (e.g., Node.js, Java, C#, Go, Rust, ...).
- Transport: Uses persistent connections. Currently TCP is supported. WebSockets, Named Pipes, Unix Domain Sockets, Standard I/O (stdio), Streamable HTTP, and SSL/TLS encryption are in development.
- Multiplexing: The architecture supports sharing a single physical connection for multiple library instances (Connection Multiplexing), reducing resource usage.
- Asynchronous: Built on Python's
asyncio. - Bidirectional Communication: Allows the server to send log messages and progress updates to the client during keyword execution.
- Dependency Isolation: Enables running libraries in separate processes or containers.
- Multi-Library Support: A single server instance can host multiple Robot Framework libraries.
- Robot Framework Integration:
- Support for argument conversion and custom converters.
- Dynamic Initialization of libraries with arguments.
- Error Handling with traceback support and failure modes (Fatal, Continuable, Skip).
Architecture
The project is organized as a monorepo managed by uv:
packages/protocol: Defines the JSON-RPC 2.0 protocol messages, data structures, and types.packages/jsonrpcpeer: An asynchronous JSON-RPC 2.0 peer implementation usingasyncio.packages/server: Server runtime components to host library code.src/JsonRpcRemote: The Robot Framework Client Library (Proxy).examples/: Runnable usage examples (e.g. a minimal server).tests/: Unit tests (tests/unit, pytest) and Robot Framework integration tests (tests/robot).
Requirements
- Python >= 3.10
- Robot Framework >= 7.0
Installation
You can install the client library using pip:
pip install robotframework-jsonrpcremote
Usage
Client (Robot Framework)
Import the JsonRpcRemote library in your Robot Framework test suite and specify the URI of the running JSON-RPC server.
*** Settings ***
Library JsonRpcRemote uri=tcp://127.0.0.1:8271 library_name=MyLibrary
*** Test Cases ***
Example Test
${result}= My Keyword Hello World
Should Be Equal ${result} Hello World
Arguments:
uri: The address of the remote server (default:tcp://127.0.0.1:8271).library_name: The name of the library to initialize on the remote server (optional).rpc_timeout: Connection timeout in seconds (default:10.0).rpc_scope: The scope of the remote session (TEST,SUITE,GLOBAL). Default isSUITE.*args: Positional arguments passed to the remote library initialization.**kwargs: Keyword arguments for the remote library initialization (sent as Robotname=valuearguments and converted server-side via the library's__init__signature).
Server
The simplest option is the ready-made server package, which hosts your existing Robot Framework libraries without code changes:
pip install robotframework-jsonrpcremote-server
robot-jsonrpcremote-server --port 8271 MyLibrary
See packages/server for all CLI options. For a hand-written server, check the examples/simple-robot-jsonrpcserver directory in this repository.
License
This project is licensed under the Apache-2.0 License.
Metadata
Release files for robotframework-jsonrpcremote 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| robotframework_jsonrpcremote-0.2.0.tar.gz | 12.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| robotframework_jsonrpcremote-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.0 kB
Release files / robotframework_jsonrpcremote-0.2.0.tar.gz
| Download URL | robotframework_jsonrpcremote-0.2.0.tar.gz |
|---|---|
| Size | 12.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
16c02027fe4c03d64206bff866b696bc3ac62f2eb21b2750571322b82c4f7f11
|
|
BLAKE2b-256 checksum How to use checksums |
1fd6b4bc31149dc80c28a4ca35403d50c006116f8222e1afe4a7bea354affc66
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / robotframework_jsonrpcremote-0.2.0-py3-none-any.whl
| Download URL | robotframework_jsonrpcremote-0.2.0-py3-none-any.whl |
|---|---|
| Size | 12.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3dd5c2ab46fcdfb3082962e9afe9a318a08280ff26efe02116b19cc255422320
|
|
BLAKE2b-256 checksum How to use checksums |
090941f4080bb2b9cefd4d343fca3f8cbcf4784a4a1ebfc03263625e33e2b987
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|