Skip to main content

Introduction

The Runabout Java Library (runabout-java) makes it easy for you to capture data in your application at runtime that is can be used within the Runabout IDE plugin to replay the event locally.

Its easiest to think of the library as a fancy toString method which converts multiple objects from a stack frame into a JSON object which instructs Runabout how to rebuild the

The main unit in which Runabout runs and can capture data is the method. The library will create

Serialization

Runabout does serialization differently than other Java projects. Instead of converting Objects to byte arrays, Runabout converts objects into a String which itself is a valid Java expression and when evaluated will create a new Object which is representative of the one origially "serialized".

Within the library, this serialization is referred to as the "Runabout Input" and represented using the RunaboutInput interface. RunaboutInput contains two parts:

  1. Eval - The String which can be evaluated as a Java expression.
  2. Dependencies - The Set of classes which are referenced in the Eval expression (fully qualified classnames).

Runabout library JSON Output

The Runabout Library outputs JSON objects with the following attributes:

  • method - A string represent the method to invoke to replay the scenario.
  • datetime - A datetime string represeting the time (UTC) when the original event occurred.
  • version - The version of the JSON object format. The latest version is 1.1.0.
  • inputs - A list of JSON objects containing the Runabout Inputs used to recreate all parameter objects, and the instance if the method is an instance method. Each of these objects contain the following:
    • type - String representing the fully quialified classname of the Class of the object created in eval
    • eval - String that is evaluated as a Java expression to create the object.
    • dependencies - List of fully qualified classnames of dependencies.

Example output

The following example output is what a user will use to replay the sceario locally in their IDE. To do this, all they need to do is copy this JSON to their clipboard, open the IDE and press the "Launch" button in the Runabout Panel.

{
"method": "com.example.Person#addSkill(java.lang.String)",
"datetime": "2024-03-11T03:40:58Z",
"inputs": [
{
"type": "com.example.Person",
"eval": "new Person(\"Ethan\", Set.of(\"reading\", \"writing\"))",
"dependencies": [
"com.example.Person",
"java.util.Set"
],
},
{
"type": "java.lang.String",
"eval": "\"programming\"",
"dependencies": [],
}
],
"version": "1.1.0"
}