Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.testbrick.com/llms.txt

Use this file to discover all available pages before exploring further.

Assertions

Assertions validate that your API returns the correct response. Add them to any API request block to automatically verify the results.

Adding assertions

  1. Click a block to open the side panel
  2. Go to the Assert tab
  3. Click + Add Assertion
  4. Select the assertion type and enter the expected value

Assertion types

Free

TypeDescriptionExample
Status code equalsCheck the HTTP status code200, 201, 404
Body not emptyVerify the response has content

Pro

TypeDescriptionExample
Status code not equalsStatus is NOT a specific code500
Body containsResponse body includes a string"success"
Body field equalsSpecific JSON field has a valueField: user.email, Value: test@test.com
Response time less thanResponse arrived within X ms2000
Header existsA specific header is presentcontent-type
Header equalsHeader has a specific valueField: content-type, Value: application/json

Results

After running, each assertion shows:
  • Pass — green checkmark with the actual value
  • Fail — red X with expected vs actual values
Failed assertions turn the block red on the canvas, making it easy to spot issues. Assertion results

Block indicator

Blocks with assertions show a shield icon on the canvas with the assertion count, so you can see at a glance which blocks have validation. Block with assertion indicator
Start with a simple “Status code equals 200” assertion on every block. This catches obvious failures immediately.