Skip to main content

All Operators

Request Helpers​

  • body - Reads parameters from the request payload.
  • queryParam - Reads parameters from the query string of the request.
  • pathParam - Reads parameters from the request path, matched using regular expressions.
  • header - Reads values from the request headers.
  • cookie - Reads cookie values from the request.

Faker Data Helpers​

  • faker - Generates realistic dummy data for various data types, entities, lorem ipsum, and more.

Operators​

Comparison OperatorsArithmetic OperationsArray & Set OperatorsString & Encoding OperatorsType Checking
eqaddsortlowercaseisNumber
gtsubtractoneOfuppercaseisInteger
ltmultiplysomeOfconcatisDate
ltedividereversecontains
gtemodulopadStart
floorpadEnd
ceilsplit
roundbase64
toFixedbase64Decode
urlEncode
urlDecode
slugify
stripTags
replace
trim
len

JSON & Object Manipulation​

  • len - Calculates the length of arrays, strings, or numbers.
  • object - Creates a JSON object from a list of key-value pairs.
  • array - Creates a list of items.
  • json - Converts JavaScript objects and arrays to their JSON string representation.
  • jsonParse - Converts a JSON-encoded string into a usable object or array within the template engine.

JWT Helpers​

  • jwtHeader - Extracts the header portion of a JWT token.
  • jwtPayload - Extracts the payload (claims) portion of a JWT token.

Control Flow​

  • switch - Selects content based on a value.
  • case - Matches a value inside a switch block.
  • default - Provides fallback content inside a switch block.
  • if...else - Renders content conditionally, with an optional fallback.
  • unless - Renders content when a condition is false; for example, {{#unless @last}},{{/unless}} adds commas between array items.
  • repeat - Repeats content a fixed or random number of times.
  • each - Iterates over items in a collection.

Inside each, use this to access the current item and @index, @first, and @last for iteration context. The repeat block supports @index and @total. These are context values, not operators.

Date​

  • now - Current date-time, with optional relative offset and format.
  • dateParse - Parse a date string or timestamp into an internal date object for chaining.
  • dateAdd - Add or subtract a duration from a date and return a formatted result.
  • dateDiff - Calculate the difference between two dates in a given unit.

Stateful Mocks​

  • step-counter - Maintains a numeric counter across requests with inc, get, set, and reset.
  • data-store - Stores and retrieves values across requests.
  • list - Maintains an ordered collection across requests with push, pop, get, delete, reset, size, shift, unshift, contains, push-unique, update, and find.

Dataset Helpers​

  • dataset - Loads matching records from an attached dataset into a named variable as an array.
  • dataset-one - Loads one matching record from an attached dataset into a named variable.
  • variables.<name> - Accesses the result of a dataset declaration. This is a variable reference, not a helper.

HTTP Callout Helpers​

Use these helpers when building a dynamic HTTP callout payload.

  • oReqBody - Reads a field from the original request body.
  • oReqQueryParam - Reads a query parameter from the original request.
  • oResBody - Reads a field from the mocked response body, for asynchronous callout workflows.