Skip to main content
Bruno uses the Chai library for assertions. All Chai expect syntax works in Bruno tests.
Write JavaScript test scripts to validate API responses, handle complex logic, and automate testing workflows. bru test script

Basic Test Structure

Common Test Examples

Testing Status Codes

Testing Response Body

Testing Nested Objects

Testing with Conditional Logic

Testing Arrays and Loops

Testing Response Headers

Testing Response Time

Advanced: Saving Values for Next Request

Error Handling

Common Chai Assertions

Next Steps

For more advanced scripting capabilities, see: