BRUNO - Share environment variables between collections
Asked Answered
B

3

7

Is there a way to share environment variables between collections? It seems that an environment belongs to one specific collection and not global as in Postman.

I'm using Bruno v1.9.0

Thanks

Bessel answered 22/2 at 12:55 Comment(1)
I have not seen a way to do what you ask thus far. I think the reason is that Bruno is designed to work locally, with a collection being the highest level of aggregation. Therefore, sharing env variable across collections is not a part of their design approach.Befool
U
2

Had this problem earlier and solved it by copying and pasting the environments folder, located inside the collection folder you selected on creation/import, and that worked for me.

Uni answered 19/4 at 21:23 Comment(0)
N
2

I've been testing out Bruno as an alternative for Postman and was also struggling with copy pasting the environments folder in Windows each time I created a new collection.

I stumbled on this article and now use the following setup: %userprofile%\Documents\BrunoAPI contains all my collections and a global environments folder with my shared environments.

When I create a new collection (eg: %userprofile%\Documents\BrunoAPI\MySuperCoolNewCollection) I run a small .bat file from that new directory to create a junction to the shared environments file:

mklink /J environments "%userprofile%\Documents\BrunoAPI\environments"

Now all collections where I created that junction share the same environments!

Newell answered 16/7 at 12:39 Comment(0)
F
0

There is nothing like global variables as far as i know, but if you are working on linux you can use shared folders, to share one of the environment folders with the other collections

Febrific answered 6/3 at 7:6 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Semiology

© 2022 - 2024 — McMap. All rights reserved.