Exploring if Bruno is a viable alternative API testing tool to Postman

Exploring if Bruno is a viable alternative API testing tool to Postman

·

6 min read

By Aska Cloke

We assess if Bruno is able to do everything Postman does

This blog post is aimed at individuals who use Postman or any other API development or testing tools in their projects. Throughout this post, we will explore the key features of Bruno, an alternative tool to Postman, and highlight the significant benefits it brought to our projects.

Postman, a reliable tool for API testing

When it comes to API testing, Postman has been the tool of choice for countless organisations. Utilised for its easy-to-use interface, Postman simplifies the API testing process and allows you to incorporate response validation tests using JavaScript, enabling users to ensure the accuracy and reliability of API responses.

Another big advantage of Postman is its flexibility when using different environments. Whether you’re testing locally, on staging servers, or in production environments, Postman provides a streamlined user experience, allowing users to adapt their testing strategies with ease.

Why look for an alternative to Postman?

In one of our projects we used GraphQL queries tailored to each environment, and we needed to ensure thorough testing across different setups. We implemented an HTML report feature, offering a visually engaging summary of our findings.

This report not only facilitated clear communication of our test results to our stakeholders, but also aided in identifying any discrepancies or areas for improvement. We were also able to streamline our testing process by integrating our collection into the CI/CD pipeline using Newman. This integration allowed for nightly executions of the collection without encountering any operational issues, enabling continuous monitoring of the services' performance and stability.

In late 2023, Postman announced it was making some significant modifications to its pricing and functionality structure. We were using the free desktop version, now known as the lightweight API, which became impractical for our needs.

While the prospect of upgrading to the enterprise version to access the necessary functionalities seemed plausible, it unveiled a dealbreaker for our client: data security.

Transitioning to the enterprise version mandated data synchronisation with the cloud, a feature that clashed with our client's security protocols. Further compounding this challenge was the absence of an offline version in Postman's offerings, except for the lightweight API. Consequently, we had to identify a suitable alternative tool that could accommodate our testing needs while adhering to our client's security standards.

Introducing Bruno

Bruno is an alternative to Postman which offers some key features that immediately appeared useful for our migration activities:

  1. User interface

  2. Importing collections

  3. Assertions

  4. Visual Studio Code extension

  5. Secrets

User interface

Bruno’s UI is very similar to Postman’s. If you’re used to using Postman, you’ll know straight away where everything is. Postman’s UI was working; it flows, so it seems like Bruno was sticking to that flow.

In Bruno's 'Settings' section, you'll discover a feature that allows you to include scripts for acquiring access tokens or executing other prerequisite actions. Additionally, you can select the authentication mode for the entire collection. Interestingly, this functionality now appears to be absent from Postman's free version, marking a notable advantage for Bruno users.

When it comes to the query section, Bruno closely resembles Postman, with one notable addition: the 'Assertion' section. This extra component provides users with a dedicated space to define assertions, allowing for more comprehensive and efficient testing. We'll delve deeper into this feature later on.

Importing collections

The ability to import existing collections from Postman proved invaluable, particularly given our prior investment in Postman. Using this functionality, we migrated our extensive collection from Postman to Bruno.

However, it's worth noting that some adjustments were necessary during the migration process. Postman’s folder section of pre-script did not get imported, so we had to rewrite it, which we needed to acquire access tokens for our APIs. Additionally, Bruno employs its own set of keywords and conventions, necessitating updates to align our tests to keep them working.

Nevertheless, despite these minor modifications, the migration process was smooth and efficient, enabling us to swiftly transition our testing infrastructure to Bruno's platform without any impact on the validity or functionality of our test suites.

A screenshot from the Bruno API testing tool showing an example of 'importing collections'

Assertions

As a test engineer, I loved this feature that Postman does not have. It allows users to effortlessly build tests one after another, simplifying the testing process significantly.

A screenshot from the Bruno API testing tool lines of code for films being imported

Despite my appreciation for this feature, its utilisation was not necessary for our project at the time. Given that we already had an extensive collection established in Postman, our approach involved importing this existing collection into Bruno and subsequently updating it to align with Bruno.

The screenshot below shows Postman’s tests that we imported into Bruno. As you can see, you cannot use them as they are. We updated all our tests using grep which took only a small amount of time to make them executable again.

A screenshot showing imported Bruno tests and updated Postman tests for the API testing tools

Visual Studio Code extension

Postman offered an 'export' function, enabling users to work with exported Postman collections in Visual Studio Code. However, the current version has removed this functionality, making it impossible to share collections through Visual Studio Code.

Bruno comes with Visual Studio Extension. What truly set this feature apart was its synchronisation with the UI. Any modifications made within the UI were automatically reflected in the corresponding files. All the essential components, header data, request body, variables, and tests, were neatly organised in one file.

A screenshot of the Visual Studio Extension feature of the Bruno API testing tool

Secrets

Within Bruno’s configuration settings, users have the capability to hide the values of variables designated as sensitive.

This functionality ensures that these values remain safeguarded within the environment settings. Consequently, they are accessible for local usage while being shielded from inadvertent exposure when pushing changes to remote repositories. The ability to hide secret values in this manner provides an added layer of security and compliance, aligning with industry best practices for safeguarding sensitive data.

A screenshot of the Env File of the Visual Studio Extension feature of the Bruno API testing tool

Did Bruno replace Postman successfully?

The short answer is yes; it did for our project. Bruno was able to do everything Postman did.

The longer answer is that during the initial phases of our migration, we encountered a hurdle in extracting environment variables within our CI/CD pipeline. This posed a significant challenge, as integration with our automated pipeline was crucial for maintaining testing efficiency and workflow continuity.

Fortunately, Bruno's status as a relatively new tool with an engaged community proved to be advantageous. The platform undergoes frequent updates, driven by user feedback and community collaboration. As luck would have it, one of the recent updates addressed the issue we encountered, providing the solution needed to proceed with migrating our Postman collections to Bruno.

In addition, Bruno's user interface proved to be intuitive and user-friendly, particularly for those accustomed to Postman. The integration with a VS Code Extension enabled collaboration and sharing among team members, encouraging more engineers to actively contribute to the collection.

Previously, the responsibility for updating the collection primarily fell on test engineers in our project. However, post-migration developers became more involved in updating the collections alongside their application code changes, as both files resided in the same repository. This shift fostered greater collaboration between developers and test engineers, resulting in a smoother and more efficient testing process.

Following the migration, our API tests continued to run without issues. The increased collaboration between developers and test engineers contributed to the overall success of the migration. Encouraged by the smooth migration and the continuous evolution of Bruno, we recommend you give Bruno a try.