← Back to Overview

TESTING

GUI Test Rules

No-code assertions for validating API responses — add rules via dropdown, no JavaScript needed.

Tests tab with 2 assertion rules and a set variable

Overview

GUI Test Rules provide no-code assertions in the Tests tab (available in Advanced Mode). Add rules via a dropdown — no JavaScript needed. Results are shown in the response Test Results tab.

Saved with the request — rules persist across sessions
Evaluated after the HTTP response is received, before test scripts run
11 source types and 15 operators cover most assertion needs

Test Sources

11 source types determine what part of the response to test:

SourceWhat it testsProperty field
statusHTTP status code (number)
timeResponse time in milliseconds
sizeBody size in bytes
bodyFull response body text
body-containsCheck if body contains a substring
body-is-jsonValidate body is valid JSON (no value needed)
body-schemaValidate against JSON schema
jsonpathExtract value via JSONPath expression$.data.id
headerCheck a response header valueheader name
content-typeResponse Content-Type header
content-lengthResponse Content-Length header

Operators

15 operators for comparing actual vs expected values:

OperatorDescriptionCategory
eqEqualsEquality
neqNot equalsEquality
gtGreater thanNumeric
gteGreater than or equalNumeric
ltLess thanNumeric
lteLess than or equalNumeric
containsContains substringString
not-containsDoes not contain substringString
matchesMatches regex patternRegex
not-matchesDoes not match regex patternRegex
is-emptyValue is emptyPresence
is-not-emptyValue is not emptyPresence
existsValue exists (for headers/jsonpath)Existence
not-existsValue does not existExistence
is-typeType check (string, number, boolean, array, object, null)Type

Adding Rules

Add test rules from the Tests tab in the request builder:

1 Click + Add Rule in the Tests tab
2 Select a source from the dropdown (status, jsonpath, header, etc.)
3 Fill the property field if needed (JSONPath expression, header name)
4 Select an operator (eq, contains, gt, etc.)
5 Enter the expected value
6 Toggle enabled/disabled as needed

Example — assert status code is 200:

Source:   status
Operator: eq
Expected: 200

Results

After sending a request, results appear in the Response → Test Results tab:

Pass — Green check with the rule label
Fail — Red cross showing expected vs actual value
Shows label, expected value, and actual value for each rule
Failed rules clearly show the mismatch between expected and actual
Results are saved to history entries
Shown in collection run reports

In Collection Runs

All test rules execute per request during collection runs:

Summary shows pass/fail counts per request and total
Failed tests cause exit code 1 in CLI mode
Results included in HTML reports

Next

Ko-fi