Skip to main content

TOML Request Reference

This document serves as the complete technical schema and reference for constructing Rumour .toml request files.

The Request Block ([request])​

Every Rumour file must contain a [request] block. It defines the core HTTP invocation parameters.

FieldTypeRequiredDescription
methodStringNoThe HTTP method (defaults to GET).
urlStringYesThe target URL. Supports {{variable}} interpolation.
skipBooleanNoIf true, Rumour skips executing this file.
protocolStringNoForces the protocol engine (e.g., http, graphql, grpc, mqtt, websocket).
pre_requestStringNoRelative path to a Rhai script to run before the request fires.
post_requestStringNoRelative path to a Rhai script to run after the request completes.
[request]
method = "POST"
url = "{{base_url}}/api/v1/users"
skip = false

Note: pre_request and post_request can also be defined at the root level of the file.

Global Tables​

These optional tables define the payload and metadata sent with the request.

[headers]​

A key-value table of HTTP headers. Keys are treated case-insensitively.

[headers]
Authorization = "Bearer {{auth_token}}"
Content-Type = "application/json"

[params]​

A key-value table appended to the URL as a query string.

[params]
limit = "100"
offset = "0"

[variables]​

A key-value table for defining local variables scope. These take precedence over environment variables but are overridden by CLI flags.

[variables]
test_user = "admin"
expected_status = "200"

The Body Block ([body])​

Defines the payload sent with POST, PUT, or PATCH requests.

FieldTypeRequiredDescription
typeStringNoThe payload format. Supports json, text, form, xml, or binary. (Defaults to json).
rawStringYesThe raw string payload to be sent. Supports {{variable}} interpolation.
[body]
type = "json"
raw = '{"email": "test_{{random}}@example.com"}'

Non-HTTP Protocol Blocks​

Rumour natively supports multiple protocols beyond standard REST. When utilizing these, specify the appropriate structural block alongside setting the protocol field.

[graphql]​

Defines a GraphQL operation payload.

FieldTypeDescription
queryStringThe raw GraphQL query string.
variablesJSON/TableVariables bound to the query.
operation_nameStringOperation name for multi-operation documents.
extensionsJSON/TableApollo persisted query / extensions object.
[graphql]
query = 'query GetUser($id: ID!) { user(id: $id) { name } }'
operation_name = "GetUser"
variables = { id = "123" }

[grpc]​

Defines a gRPC call. Requires the URL scheme to be grpc:// or grpcs://.

FieldTypeDescription
proto_fileStringPath to the .proto file defining the service.
serviceStringThe gRPC service name.
methodStringThe gRPC method name.
request_jsonJSON/TableJSON-serialized message payload.
deadline_msIntegerCall deadline in milliseconds.
metadataTablegRPC metadata (equivalent to HTTP headers).

[mqtt]​

Defines an MQTT publish/subscribe interaction.

FieldTypeDescription
actionString"publish", "subscribe", or "publish_subscribe" (Default: "publish").
topicStringTopic to publish to.
subscribe_topicStringTopic to subscribe and receive from.
qosIntegerQuality of Service: 0, 1, or 2 (Default: 1).
timeout_msIntegerTimeout waiting for broker acknowledgement or message (Default: 5000).

[websocket]​

Defines a WebSocket message sequence.

FieldTypeDescription
actionStringShorthand action: "send", "listen", "connect", or "close".
expect_messageStringExpected message substring (asserted after receive).
timeout_msIntegerConnection + receive timeout in ms.
message_typeStringFrame type: "text" (default) or "binary".
messagesArrayA sequence array of messages to send/receive in order.

The Dependency Block ([dependencies])​

Defines which other .toml requests must successfully complete before this request can execute, and specifies which variables to import from them.

Rumour uses this block to automatically construct the execution DAG (Directed Acyclic Graph) for parallel multi-threading.

Array Import Syntax​

Used when you want to import multiple variables from a single dependency.

[dependencies]
"../auth/login.toml" = ["access_token", "refresh_token"]
"../setup/create_account.toml" = ["account_id"]

Single Import Syntax​

Used when you only need one variable.

[dependencies]
"../auth/login.toml" = "access_token"

Explicit List Syntax​

Alternatively, you can define dependencies explicitly as an array of tables, which maps a consumer_var to a producer_id.

[[dependencies]]
consumer_var = "access_token"
producer_id = "../auth/login.toml"

The Extract Block ([extract])​

Defines extraction rules to pull dynamic data out of the HTTP response and store it in global variable memory for subsequent requests.

Keys are the variable names you want to create. Values are the traversal paths.

PrefixDescriptionExample
json.Traverses a JSON response body using dot notation. Supports [n] arrays.json.data.users[0].id
header.Extracts the value of a specific response header (case-insensitive).header.set-cookie
[extract]
user_token = "json.token"
session_cookie = "header.set-cookie"

The Assert Block ([assert])​

Defines automated validations for the response. If any assertion fails, the entire node is marked as failed.

Root Assertions​

FieldTypeDescription
statusIntegerAsserts an exact HTTP status code (e.g., 200).
status_rangeStringAsserts a range or list of codes (e.g., 200-299 or 200,201).
body_containsStringAsserts that the exact substring exists somewhere in the response body.
durationIntegerAsserts that the total network request time does not exceed this amount in milliseconds (SLA).
schemaStringPath to a local .json file containing a Draft-07 JSON Schema to validate the response structure against.
grpc_statusIntegerAsserts an exact gRPC status code (e.g., 0 for OK).
graphql_errorsBooleanIf false, allows GraphQL errors without failing the request (by default, GraphQL error payloads cause test failure).
[assert]
status_range = "200-299"
body_contains = "SUCCESS"
duration = 500
schema = "./schemas/user.json"

Advanced JSON Assertions ([assert.json])​

Validates specific leaf nodes in a JSON response. The key is the JSON path, and the value is a constraint table.

Supported Constraints:

  • equal: Exact value match (strings, numbers, booleans).
  • not_equal: Inverse exact value match.
  • contains: Substring match.
  • exists: Boolean asserting the path is present (even if null).
  • greater_than / less_than: Numeric bounds checking.
  • regex: Regular expression pattern matching.
[assert.json]
"data.id" = { greater_than = 100 }
"data.email" = { regex = "^[a-z]+@swahira\\.io$" }
"data.deleted" = { exists = false }

Advanced Header Assertions ([assert.headers])​

Validates response headers. It supports the same constraints as [assert.json], except for numeric operators.

[assert.headers]
"content-type" = { contains = "application/json" }
"cache-control" = { equal = "no-cache" }

Execution Directives​

These root-level keys control how Rumour handles the request execution lifecycle.

FieldTypeDescription
nameStringA human-readable display name for the CLI trace output.
skipBooleanSkips execution of this file entirely.
retriesIntegerHow many times to automatically retry the request on network timeout or assertion failure (Defaults to 0).
orderedBooleanIf true, forces the node to run sequentially outside of the normal parallel dependency graph.
protocolStringForces the engine to use a specific protocol (can also be defined inside [request]).
stress_test_dataTableConfiguration object for orchestrating load testing parameters on this specific request.
name = "Flaky Third Party API"
retries = 3
ordered = true