Managing API collections is an important task for software developers, and this is where API clients come into play. While Postman and Insomnia are prominent tools in this field, their limitations have prompted developers to explore other API clients. As a result, many have adopted Bruno, a newer solution that has gained significant traction in the past year or two.
Not just because it’s new but also because it revolutionizes the status quo presented by Postman, Insomnia, and other similar tools out there. But what is Bruno and how does it stack up against these tools? This is what we’ll be covering in this article. By the end of the article, you’ll have a grasp of:
- What Bruno is.
- How to install and use it.
- How it compares with Postman and Insomnia, and how it edges them out.
Let’s begin.
What is Bruno?
Bruno is a modern open-source API Client with intuitive interfaces used for testing, debugging, and managing requests. It mainly focuses on enhancing the developer experience with its minimalist design and improved overall performance due to its lightweight nature.
Bruno’s popularity among software engineers in API development has been on the rise. One of the major reasons dates back to May 14, 2023, when Postman decided to discontinue the Scratch Pad model which had offline capabilities.
This meant that developers had to log in to access their collections which were hosted in the Cloud after synchronization. The same scenario happened with Insomnia on September 28, 2023, when they released version 8.0. Without logging in, developers had limited functionality.
Therefore they had to search for other API Client tools that isolated API workspace from third-party servers. And that’s where Bruno comes in.
Why choose Bruno?
Being an open-source API Client, it allows developers to use, modify, and distribute it freely. This encourages a communal approach and transparency to its improvement and development.
With a major emphasis on collaboration, data privacy, and security your collections are stored offline which can be shared as a file or be worked on collaboratively via standard version control systems such as Git. Additionally, you are not required to log in to access your data.
Bruno also allows you to import your collections from Postman and Insomnia, and use them in different environments in the same way as other API Clients.
How to set up and use Bruno?
Prerequisites
To follow along with this tutorial, you will need:
- To Install Bruno: You can download Bruno from the official website or GitHub repository. It’s available for Windows, macOS, and Linux.
- Some APIs for testing: You can get fake APIs from JSONPlaceholder.
Creating a GET Request
Step 1: Creating a Collection
After installing Bruno, open the Bruno app and click on Create Collection:
In the popup, enter your preferred Collection name. Select the location of the directory in your file system then proceed to save your collection.
Step 2: Adding an API Request
On the newly created collection, click on the three dots to display a drop-down menu from which you can select ‘ New Request ’.
Add the name of the request and the request URL as https://jsonplaceholder.typicode.com/posts/1.
Step 3: Incorporating Test Checks
To do this, you can use Bruno’s built-in test-assert option on the panel:
This has three parameters for you to fill in–Expression, value, and, operator.
Example Assertions
- Verify Status Code
Expression: res.status
Operator: equals
Value: 200
You can debug your assertions by clicking the run button (shaped like a right-facing arrow) and check if the results are as expected.
Using JavaScript
You can also use JavaScript to debug. Click on ‘ Tests ’ below Demo1 to open a panel then enter the code below.
function testStatusCode(response) {
if (response.status === 200) {
return true;
} else {
return false;
}
}
You can view the results as expected on the right panel.
A Comparison of API Client Tools: Bruno, Insomnia, and Postman
Each of these API clients has different strengths. knowing which one to select can have a massive impact on productivity and workflow.
Popularity and ecosystem
Of the three, Postman is the most popular and widely used API Client. This is because it has extensive documentation, a large active community, and excels at collaboration, which allows developers to share workflows, environments, and collections.
Insomnia comes in second and is highly valued for its sleek nature, intuitive interface, and focus on simplicity in API testing. However, it has a smaller community and fewer resources compared to Postman.
Bruno on the other hand is still relatively new and has yet to establish a large community and ecosystem but its popularity is steadily rising.
Performance and resource usage
Bruno’s lightweight design makes it accessible even to less powerful devices, making it highly efficient in resource-constrained environments.
Postman, with its extensive options and cloud integration, tends to demand more system resources. This will be disadvantageous for users with older devices.
Insomnia falls somewhere in between, offering a good balance of performance and functionality without being overly resource-intensive.
Automation and testing
Postman excels in this section. With advanced features like Collection Runner and Newman CLI, users can automate API testing and integrate these workflows into CI/CD pipelines.
Insomnia is not as advanced as it offers basic testing capabilities and allows users to extend its functionality through plugins.
Similarly, Bruno lacks advanced features for testing and automation as it’s constrained to basic functionality.
User interface and Usability
Postman has a more detailed and complex interface mainly used for managing large-scale projects. This tends to be intimidating and overwhelming, particularly for beginners.
Insomnia on the other hand has a clean and intuitive interface making it more user-friendly for beginners and developers focusing on simpler workflows.
Bruno uses the minimalistic approach by providing a lightweight and straightforward interface.
Collaboration and Teamwork
Postman has extensively advanced features that are applicable in this area such as shared workspaces, collection sharing, Postman API and mock servers, version control, real-time sync, and notification. These features make Postman stand out when it comes to collaboration and teamwork.
Insomnia also supports teamwork and collaboration though not as elaboratively as Postman. It also requires login and internet connectivity which can be quite limiting.
Bruno has a native Git-centric design allowing it to seamlessly integrate with Git offering a decentralized approach to collaboration that allows developers to share collections and updates effortlessly.
How Bruno outperforms Postman and Insomnia
Now that we’ve looked at how Bruno generally stacks up against these two powerhouses, let’s dive into its unique features. What makes it stand out from the crowd is that it isn’t just a new tool in the market but one that offers a different kind of solution contrary to the existing API Clients.
Lightweight and User-friendly
Bruno’s design is simple and intuitive, focused on the essentials — creating, testing, and managing API requests. This allows users to quickly access necessary features thus working faster. For beginners, it means a reduced learning curve as the UI is clean, distraction-free, and easy to navigate seamlessly from collections, requests, and settings.
This gives it an edge over Postman, where developers must navigate multiple menus to find specific features.
Bruno’s lightweight nature stems from its minimalistic design. This translates to faster load times and smoother performance across various devices including low-spec and older systems.
Similarly, Bruno utilizes significantly lower memory and CPU than Postman making it ideal for developers working with fewer resources.
This allows developers to run Bruno simultaneously with multiple applications such as an IDE, browser, and database tool without experiencing a system lag or decline in performance.
Collections are stored within your repository
Bruno’s developers created the Bru Markup Language specifically to address the way collections are saved and exported.
With Postman and Insomnia, you must export and save collections as a single JSON file. This forces developers to useproprietary version control systems to be able to collaborate.
This is not the case with Bruno. The Bru markup language makes it possible for users to store API requests as plain text. This means your API collections are saved in a folder within your code repository allowing you to choose a version control system of your liking.
With this, collaboration becomes easy by pulling requests as human-readable files which enables developers to understand any changes made to the API collection.
Below is an example of a GET request including some parameters.
How API Requests are made
Making an API request in the Postman Web App involves routing the request via their proprietary proxy server which usually acts as a bridge between Postman and the target API server. To do this, you’ll need to provide the proxy’s server address, port, and authentication credentials in the Postman’s settings.
Reports also suggested that the Postman desktop app has been using a proxy server to make API requests. This poses a huge security risk.
Contrary to Postman, API requests in Bruno are made directly from your computer. Giving you full control of your data.
Here’s an example of how API requests are made in Bruno:
Collection Runs
This is a crucial feature in API Clients as it allows developers to automate the execution of multiple API Requests, saving time and maintaining consistency in testing.
Bruno allows its users to carry out collection runs an infinite number of times free of charge.
Below is an example of how to perform a collection run in Bruno:
Postman Collection Runner is available at 25 runs per month for the free and basic plan, 250 runs per month for the professional plan, and infinite runs per month for the enterprise plan.
This has sparked a lot of debate. For instance, what problem is it solving? Why would there be a limit? With a feature using no Postman Cloud resources when running locally, it makes no sense to pay for it.
NPM modules support
Bruno has numerous Pre-installed Libraries to facilitate your scripting. These include:
However, if you have a particular external library in mind, you can easily install it using package.json. Use this External Libraries documentation to get you started.
Unlike Bruno’s straightforward integration with NPM modules, Postman requires workarounds to achieve the same goal which can complicate workflows. This involves loading from CDN and saving the entire library library in collection variables to load npm modules.
Support for CLI
Bruno allows users to run API collections effortlessly using simple command line commands.
So if you want to test your APIs in different environments, automate your testing process, integrate your API tests, or deploy your workflows you can do it directly from your CLI.
To make this possible, run this in your CLI to install:
You can then run your collections by;
To run all the requests within a specific folder, use;
If you want to run your collection within a specific environment, use;
To dive deeper, you can check out Bruno CLI’s documentation.
Conclusion: Is Bruno just another API client?
To conclude, Bruno is a modern API Client that aims to rise against the monopoly of bloated and closed systems. It is a lightweight, easy-to-use API Client that does not require you to create an account or a constant internet connection to use it–unlike Postman & Insomnia.
Even though it’s still new, it disrupts the status quo set up by traditional API Clients by providing data sovereignty, resource efficiency, and straightforward usability. This positions it as more than just another API Client in the market.
Top comments (0)