microcks icon indicating copy to clipboard operation
microcks copied to clipboard

Feature Request: Add native support for Bruno collections in Microcks

Open sgkiokas opened this issue 3 months ago • 8 comments

Reason/Context

Currently, Microcks supports Postman collections but not Bruno collections directly. While Bruno offers an export-to-Postman option, this conversion is incomplete and lacks support for important features such as request/response events or scripts that define dynamic mocking logic.

For example, in Bruno a pre-request event might contain logic for generating payloads, computing signatures, or setting variables dynamically. When exported to Postman, these events are not properly converted into Postman-compatible scripts. This leads to broken or missing functionality in Microcks when working with these collections.

This improvement would help teams who already use Bruno as their primary API client to integrate with Microcks seamlessly, without having to rely on lossy conversions. It would also reduce the overhead of manually rewriting or revalidating event scripts after export, which is time-consuming and error-prone.

The motivation is to extend Microcks’ usability to a broader community of API practitioners who are adopting Bruno as a lightweight, modern alternative to Postman, and to ensure that dynamic mocking scenarios defined in Bruno collections are preserved and respected when imported into Microcks.

Description

The feature request is to add native support for Bruno collections in Microcks, alongside the existing Postman support.

At the moment, Bruno collections can only be imported into Microcks by first exporting them as Postman collections. However, this process does not handle advanced features such as event blocks, pre-request/post-response scripts, or Bruno-specific variable resolution. For example, Bruno’s event system allows dynamic payload generation and cryptographic signing of requests, but these scripts are either ignored or exported in a format that is not Postman-compatible.

The proposed change would allow Microcks to:

  • Import Bruno collections directly, without requiring a Postman export step.
  • Preserve event scripts, variables, and dynamic mocking logic defined in Bruno collections.
  • Provide parity with Postman support so users can switch between the two tools without losing functionality.

This would not be a breaking change, as existing Postman collection support remains unaffected. Instead, it would broaden the scope of supported tools and reduce friction for teams already using Bruno.

Implementation ideas

No response

sgkiokas avatar Sep 17 '25 14:09 sgkiokas

Hi @sgkiokas and thanks for raising this feature request/discussion!

There are 2 use-cases of seeing Microcks <> Bruno integration as an alternative to what we're doing with Postman:

  • The mocking side involves gathering request/response pairs examples from a Bruno collection - and it seems to be an opened issue here https://github.com/usebruno/bruno/issues/1235 in the Bruno repo,

  • The testing side involves "running" an unchanged Bruno collection - which involves executing pre-scripts (like request preparation) and post-scripts (like assertions and validation). The approach there could be to wrap a lightweight bruno-runtime (as we did with https://github.com/microcks/microcks-postman-runtim). Such utilities seems to exist but wrapped into the Bruno CLI package. WE'd probably have to dig and extract some of them.

I would be curious to hear about the Bruno community's views on this topic. Do they already integrate with a favourite mocking/contract testing tool? Are they open to contribution, refactoring, or adaptation? What about their community users? Are there some other Bruno's users out here?

lbroudoux avatar Sep 22 '25 08:09 lbroudoux

Thanks for coming back @lbroudoux . I can investigate a bit more and gather some of those info in case it helps to built that case.

The reason for mentioning that is that we are now in the second phase of incorporating Microcks in our company and because some of the specs we want to base our mocks on come from third party providers (like payment providers), we have 0 control over them. This means that we need to turn Postman collections into primary artifacts directly. One of the teams that want to adopt Microcks have shifted from Postman to Bruno.

If we do not gather a lot of interest to add this feature. I am more than happy to build a simple wrapper for this kind of conversion and contribute it to your docs purely for convenience for someone else.

sgkiokas avatar Sep 22 '25 08:09 sgkiokas

Awesome! Yes, please share any technical details along with your investigations. It could also help others who would love to join forces on that topic.

lbroudoux avatar Sep 22 '25 08:09 lbroudoux

Hi @sgkiokas Did you make any progress in your investigations? DO you already have some insights to share?

lbroudoux avatar Oct 08 '25 20:10 lbroudoux

@lbroudoux apologies for the late reply. Unfortunately, nothing due to my workload... I'll try my best and post any update here.

sgkiokas avatar Oct 10 '25 10:10 sgkiokas

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 30 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. Microcks is a Cloud Native Computing Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

github-actions[bot] avatar Nov 10 '25 00:11 github-actions[bot]

The recording of request/response in Bruno collection is now available in the new version of Bruno: see https://github.com/usebruno/bruno/issues/1235#issuecomment-3511102988

lbroudoux avatar Nov 10 '25 18:11 lbroudoux

@lbroudoux assign me

namanONcode avatar Dec 04 '25 16:12 namanONcode