100+ Assertion Types

Validate every aspect of API responses with 100+ built-in assertions.
Updated

What It Does

The assertion engine provides 100+ built-in assertion types. Categories include: Status Code assertions (equals, not-equals, one of, class), Header assertions (exists, equals, contains), Body and field assertions (value, type, exists, array length, contains, regex), Performance assertions (response time below a threshold, and p95 or p99 across a workflow), protocol assertions for SOAP, GraphQL, JSON-RPC/MCP, WebSocket-RPC and SSE, security hygiene assertions, assertions on the request that was sent, and Custom assertions (JavaScript with access to the response, headers, and status). Generated tests come with relevant assertions already in place — but you can override, add, or remove any assertion from the visual editor.

Assertion types checking a JSON API response one by one: status code equals 200, content-type header contains json, response time under 500 ms, the id field exists, status equals shipped, total is a number, items length is 3 and email matches a regex; all eight pass

Overview

From status codes and field types to response time and custom JavaScript — 100+ built-in assertion types ensure thorough validation of every API response. Assert on status codes, response headers, JSON body fields by path (for example orders[*].id), XML elements, response time thresholds, data types, array lengths, regex patterns, SOAP faults, GraphQL errors, MCP tool results, SSE streams and the request you actually sent. For advanced scenarios, write custom JavaScript assertions with access to the full request and response; pre- and post-request scripts run in an isolated QuickJS/WebAssembly sandbox. Generated tests come with a baseline of status, timing and schema-derived field and type checks, so you get thorough validation without manual configuration.

Key Capabilities

Status code, headers, and response body assertions
Field existence, value and type checking by path
Response time and performance threshold assertions
Custom JavaScript assertions with a 5-second timeout
Regex pattern matching on body, headers, fields and error messages
Array length, null type, exists/not-exists and status-class assertions

How It Works

  1. 1

    Pick assertion types from the categorised visual picker, or choose a field from the schema with Quick JSON

  2. 2

    Configure expected values, operators, thresholds and field paths; expected values can come from a data row

  3. 3

    Generated tests include status, timing and schema-derived field and type checks

  4. 4

    Custom JavaScript assertions run with a 5-second timeout and show their own log lines

  5. 5

    Each assertion shows a clear pass/fail result with expected vs. actual values in reports

Available on

All Plans

Included in the free trial — no credit card required.

Included in all plans
See pricing →

Try Assertions Today

Start your 15-day free trial — no credit card required.