Bruno uses the Chai library ↗, so you can follow the same syntax for writing
assertions in your tests.
- Assertions to declaratively write tests
- JavaScript
Assertion
To get familiar with testing:- open a Collection
- Select a request
- Click on the
Assertionstab

Testing with JavaScript
Bruno also supports writing automation test scripts in JavaScript for more advanced API testing scenarios. By automating your tests, you can increase efficiency and coverage, and integrate testing into CI/CD pipelines.Example
copy

- The first test checks that the response status is 200 (indicating a successful login).
- The second test verifies that the response body is equal to the expected JSON object.