/ SONDA · BUILD

Three languages for scripts. None for checks.

A pre-request or post-response script in JavaScript, Go or Python, with the same sonda API in all three and real IntelliSense in the editor. And for the ninety percent of tests that are "the status is 200 and the body has an id", a check is a sentence you pick from three menus — no code at all.

JAVASCRIPT · GO · PYTHON 10 SUBJECTS × 25 OPERATORS JSON SCHEMA 309 SNIPPETS

At a glance

WhereScripts on the project, a folder and the request, run in that order; each can pick its own language.
APIsonda.environment, globals, projectVariables, variables, request, response, info, iterationData, expect, test, sendRequest, setNextRequest, skipRequest, hash, hmac, uuid, base64, console.
EditorMonaco with TypeScript IntelliSense for sonda.* and the snippets panel: 123 JavaScript, 94 Go, 92 Python.
Limits10 seconds per script; a sendRequest restarts the clock. Go is a standard-library allow-list: no files, no processes, no network.
ThemisWrites a request's script into the editor, or the checks from the last answer.
/ ONE SEND, IN ORDER

The project's script, the folder's, the request's. The send. The checks. The script after.

A script lives on the project, on a folder or on the request, and a send runs them in that order — each one in the language it picked, JavaScript, Go or Python, against the same sonda object: environment, globals, projectVariables, variables, request, response, info, iterationData, expect, test, sendRequest, setNextRequest, skipRequest, hash, hmac, uuid, base64, console. The editor is Monaco with TypeScript IntelliSense for sonda.*, and a snippets panel with 123 JavaScript, 94 Go and 92 Python snippets. Themis writes a request's script into the editor, or the checks from the last answer.

Ten seconds per script; a sendRequest restarts the clock. Go runs on a standard-library allow-list — no files, no processes, no network. A check needs none of this: subject, operator, value, picked from three menus, read by the runner, the flows and the load test alike.

The runner reads the same checks
/ CHECKS

Tests that read as sentences.

Subject, operator, value. The runner, the flows and the load test all read them, and a failing one brings the Tests tab forward on its own.

Ten subjects, the spec among them.

Status, time, size, redirects, content type, a header, a cookie, the body, a JSON path in it, and the spec — "the answer matches the spec" validates against the project's OpenAPI document.

Twenty-five operators.

Equals and not, contains, starts and ends with, matches, one of, greater and less, between, exists, empty, null, is type, length and its bounds, is a date, matches a JSON Schema.

Inherited down, before the script.

Checks on a folder or a project run on every answer under them, before the post script. Draft a JSON Schema from an answer in one click. Re-read a check without sending again.

See the rows as code in any of the three languages.

/ A SCRIPT, AND WHAT IT DID

Five lines after the answer. The checks beside them.

A post-response script reads the answer, sets what the next request needs, adds a test of its own and decides where the run goes next. The checks ran before it — the project's and the folder's first, then the request's own — and the Tests tab says which held, which did not, and where each one came from.

Beside it, one request's post-response script in JavaScript, and the Tests tab and console after the send.

// POST /orders · post-response · JavaScript const body = sonda.response.json(); sonda.environment.set("orderId", body.id); sonda.test("has an id", () => sonda.expect(body.id).toBeTruthy()); if (body.status === "held") sonda.setNextRequest("Capture"); ── Tests ───────────────────────────────────────────── ✓ status equals 200 inherited · folder Orders ✓ the answer matches the spec inherited · project ✓ body.id exists ✗ time less than 300 ms 412 ms ✓ has an id script ── Console ─────────────────────────────────────────── orderId = ord_7f2a · next: Capture // 10 s per script; a sendRequest restarts the clock
/ SCRIPTS FROM OTHER CLIENTS

The scripts you have come across.

The scripting object is sonda, and the importer knows what yours was.

Your clientFrom the client you use today: on import, pm. becomes sonda.; the older global calls and the tests[...] lines are converted. On export back to that client's format, the reverse is done.
Other clientsA compatibility layer for bru, req, res and test(). Folders written for that client import with their scripts, their tests as checks, and their docs.
require()Shims over sonda for the usual suspects: lodash, uuid, nanoid, crypto-js hashes and HMAC, dayjs, moment, date-fns, axios, chai, buffer.
/ LOCKFLARE SONDA

Scripts and checks, in the free edition.

Checks and the runner, listed →