Skip to content
JsonRpcRemote is in pre-alpha and under active development. This documentation describes the development version on main, which may differ from the latest release, and more features are coming: see Status and roadmap.

Status and roadmap

JsonRpcRemote is in pre-alpha and under active development. Its interfaces can still change from one release to the next, and more features are coming. This page lists what works today and what is planned. Ideas and problems are welcome as issues.

Client library JsonRpcRemote

  • Starts the server itself and talks to it over a pipe of its own or over its stdin and stdout, or connects to a server that listens on a pipe or on a TCP port. A pipe is a named pipe on Windows and a Unix domain socket elsewhere. The command of a server that it starts can be a string or a list; see Transports.
  • Imports a remote library with positional and named arguments from the suite, and offers its keywords, also those with embedded arguments, with their arguments, types, defaults, documentation, tags, sources and lines; see the arguments of JsonRpcRemote.
  • Writes the log messages of a remote keyword to the Robot Framework log while the keyword runs, at the log level of the suite.
  • Reports a failing remote keyword like a failing local one, with its message and its traceback, and skips the test, continues it or stops the run; see Failures of remote keywords.
  • Starts a session per test, per suite or for the whole run; see Sessions and rpc_scope.
  • Detects lost connections, waits for a server that is not reachable yet, and reconnects with a check of the library definition; see Lost connections and connect retry.

Server robot-jsonrpcremote-server

  • Makes almost any Robot Framework library remote without code: Robot Framework itself imports and runs it, including its argument conversion.
  • Serves several libraries, to several clients at the same time; see Several libraries on one server.
  • Listens on a TCP port or on a pipe, or serves the client that started it over a pipe or over its stdin and stdout; see the server options.
  • Takes Robot Framework’s --pythonpath, --variable, --variablefile and --outputdir; see the server options.
  • Stops in an orderly way on SIGTERM and SIGINT, also in a container.

Protocol

  • JSON-RPC 2.0 with the framing of the Language Server Protocol, defined in the package robotframework-jsonrpcremote-protocol, where the classes ServerEndpoint and ClientEndpoint state both sides for servers in Python, with a hand-written example server; see the protocol.
  • An example server in Node.js, in TypeScript on the JSON-RPC library vscode-jsonrpc, which serves a whole session over TCP, a pipe or its stdin and stdout; see the protocol.
  • A message that cannot be read does not end the session: the client shows the problem in Robot Framework’s log and on the console.
  • Arguments and return values of keywords and the arguments of a library import are JSON values, nested to any depth. Argument defaults are JSON scalars or the text that Libdoc shows for them.
  • Lists and dicts of JSON values travel as plain JSON.
  • Between Python peers, keyword arguments and return values that JSON cannot carry travel as pickles, so they keep their type, if both sides read pickles, as they state in robot/initialize; --no-pickles on the server and rpc_pickles=False on the client turn them off.
  • Typed values: dataclasses, enums, named tuples, standard types such as datetime, Decimal, bytes, UUID and Path, and tuples, sets and dicts with keys other than strings travel as JSON in a form of their own, which a server in another language reads and writes, with classes that client and server share by their module names. The library definition names the types of arguments and return values; see the protocol.

Package jsonrpcpeer

  • A JSON-RPC 2.0 peer on asyncio that can be used on its own: requests, notifications and batches, in both directions; see its README.
  • Endpoints: one definition of an interface for both sides of a connection, which type checkers hold both sides to.
  • A connection over the stdin and stdout of a process with open_stdio_connection(), which keeps print() and child processes out of it, and create_stdio_subprocess(), which starts a process with such a connection.
  • Named pipes on Windows and Unix domain sockets elsewhere, with start_pipe_server() and open_pipe_connection(), and create_pipe_subprocess(), which starts a process with a connection over a pipe of its own.
  • More transports: WebSockets and Streamable HTTP, and encryption with TLS.
  • Servers in other languages: more example servers in other languages, such as Rust, Java and .NET.
  • A Robot Framework process per session on the server, so that sessions run apart from each other.
  • Keyword timeouts and cancellation, including the test and keyword timeouts of Robot Framework.
  • Access control for the server and protection of the values that travel as pickles.
  • Several libraries over one connection, and progress messages while a keyword runs.