2 Testing API with Bruno
Elinus Persson edited this page 2026-05-12 12:25:07 +00:00

Testing API with Bruno

Introduction

Bruno is a git native API client which means it can store its results in folders and text files that can be sent along with git pulls and pushes. The text file will act as documentation of API calls/url endpoints and their results which can help develop different views by giving clear documentation of existing endpoints and what data they receive.

Prerequisites

  • Git
  • Optional: Node.js

How to use

  1. Install Bruno.
  2. Create a new "Collection".
  3. Add a "New request".
    • Set the type to HTTP.
    • Add a request name.
    • Set the GET/POST method.
    • Add the URL, for example: http://172.18.0.14:8080/layout/getSpecificLayout. Note: The IP, if needed, can be found using docker inspect. But the service has been added in the endpoint config, then use that mapping instead. Example on that is: http://127.0.0.1/api/login/auth/login
  4. If there are parameters needed, you can:
    • Add them to the "Params" tab (which auto-appends them to the URL).
    • Set the "Body" to JSON format and add the payload there (for POST/PUT requests). Note: A body containt type need to be selected. That can be done on the defult "no body" button at the end of the header where the tabs are found.
    • Manually type them at the end of the URL.
  5. Press the send button to send the request.

Here is a quick start guide provided by Bruno. It contains helpful screenshots and more in-depth explanations on how to configure specific methods and advanced features.