Skip to main content

Add your description here

Project description

robotframework-jsonrpcremote

[DRAFT]

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/: Usage examples and integration tests.

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:8888

*** Test Cases ***
Example Test
    ${result}=    Echo    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 passed to the remote library initialization.

Server

To implement a server, you can use the provided server packages.

For a complete runnable example, please check the examples/simple-robot-jsonrpcserver directory in this repository.

Development

This project uses uv for dependency management.

  1. Setup: uv sync --all-extras --all-packages --dev
  2. Run Tests:
    • Start simple example server: uv run -m simple_robot_jsonrpcserver
    • Run tests: uv run robotcode run
  3. Build: uv build --all-packages

License

This project is licensed under the Apache-2.0 License.

Project details


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.1.0.tar.gz (6.9 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.1.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: robotframework_jsonrpcremote-0.1.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":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.1.0.tar.gz
Algorithm Hash digest
SHA256 b3be3996783abd91a515fa3714994b346f317790d6ff08e221118db24a0ec08b
MD5 a286969ba1798ab0c3e3a63ecea894ff
BLAKE2b-256 05304042f7cf9df17a664845d04c08c27cb7e665ace97166d1b686e1e247f7cf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: robotframework_jsonrpcremote-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 120b10bd7ae71de3abae8fbce3e54abd1db021cf4cd963c6b6f4dabe7df37bd4
MD5 821380045d0002247e62e6896d667dce
BLAKE2b-256 5f94d6a75d4f6697677a23ed50dc90367c4bbdf5e5343ce7b0e10e3f9b9cdc91

See more details on using hashes here.

Supported by

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