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
- Click a block to open the side panel
- Go to the Assert tab
- Click + Add Assertion
- Select the assertion type and enter the expected value
Assertion types
Free
| Type | Description | Example |
|---|---|---|
| Status code equals | Check the HTTP status code | 200, 201, 404 |
| Body not empty | Verify the response has content | — |
Pro
| Type | Description | Example |
|---|---|---|
| Status code not equals | Status is NOT a specific code | 500 |
| Body contains | Response body includes a string | "success" |
| Body field equals | Specific JSON field has a value | Field: user.email, Value: test@test.com |
| Response time less than | Response arrived within X ms | 2000 |
| Header exists | A specific header is present | content-type |
| Header equals | Header has a specific value | Field: 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
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.