Skip to main content

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 using asyncio.
  • 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 is SUITE.
  • *args: Positional arguments passed to the remote library initialization.
  • **kwargs: Keyword arguments for the remote library initialization (sent as Robot name=value arguments 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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robotframework_jsonrpcremote-0.2.0.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

robotframework_jsonrpcremote-0.2.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file robotframework_jsonrpcremote-0.2.0.tar.gz.

File metadata

  • Download URL: robotframework_jsonrpcremote-0.2.0.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for robotframework_jsonrpcremote-0.2.0.tar.gz
Algorithm Hash digest
SHA256 16c02027fe4c03d64206bff866b696bc3ac62f2eb21b2750571322b82c4f7f11
MD5 d18b1c6203ca975ff33aa4e12bbe3ef8
BLAKE2b-256 1fd6b4bc31149dc80c28a4ca35403d50c006116f8222e1afe4a7bea354affc66

See more details on using hashes here.

File details

Details for the file robotframework_jsonrpcremote-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: robotframework_jsonrpcremote-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for robotframework_jsonrpcremote-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3dd5c2ab46fcdfb3082962e9afe9a318a08280ff26efe02116b19cc255422320
MD5 d3e672b6294f5d65e2ea621e9e709601
BLAKE2b-256 090941f4080bb2b9cefd4d343fca3f8cbcf4784a4a1ebfc03263625e33e2b987

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page