API Test Client
Bruno is a lightweight, open-source API client designed for developers who prefer storing their collections in version control. In this course, we’ll use Bruno to test our deployed backend.
If you haven’t installed Bruno yet, refer to the installation guide.
Why Bruno?
- Local-first, Git-friendly API collections.
- Open-source and privacy-focused.
- Fast, responsive, and simple to use.
- Ideal for REST API testing.
Getting Started with Bruno
Adding variables in Bruno
- Open your collection in Bruno.
- Go to the Vars tab.
- Add the following variable:
- Name: baseUrl
- Value: http://localhost:8000
These variable can now be used throughout your requests.
Using Variables in Requests
In your request URL, use double curly braces around your variable name. Bruno will automatically substitute the values with collection variables when sending the request.
Setting Authentication on the Collection
To apply authentication across all requests in a collection:
- Open the collection.
- Navigate to the Auth tab.
- Select Basic Auth
- Username: your username
- Password: your password
- Save changes.
Creating a GET Request
- Open Bruno and create a new workspace.
- Create a new collection (e.g.,
dev
). - Add a new request:
- Method:
GET
- URL: ``
- Method:
- Set the
Auth
type toBasic Auth
and enter your username + password - Click Send and inspect the response.
OPTIONAL: Code generation
Once you successfully managed to use an API, you can use Bruno to generate code samples in various languages / libraries