Collection Environment and Global Environment in Bruno
Collection Environment and Global Environment in Bruno
Bruno is an open-source API client that helps developers test and manage their APIs effectively. While working with APIs, environments play an important role in managing variables such as URLs, tokens, and configurations. In Bruno, two common types of environments are Collection Environment and Global Environment.
What is Collection Environment
A Collection Environment in Bruno is specific to a particular API collection. It contains variables and configurations that apply only to that collection, making it easy to manage collection-based values like endpoints, authentication keys, or test data.
What is Global Environment
A Global Environment in Bruno is accessible across all collections. It stores common variables that can be reused universally, such as user credentials, tokens, or base URLs shared between multiple collections.
Collection Environment vs Global Environment
Collection Environment | Global Environment | |
---|---|---|
Scope | Applies only to the specific API collection where it is created. | Applies across all collections in Bruno. |
Usage | Best for collection-specific values like endpoints, keys, or dataset. | Best for shared values like tokens, credentials, or common URLs. |
Accessibility | Accessible only within that collection. | Accessible globally across all collections. |
Flexibility | Provides fine control over collection-based configurations. | Provides convenience for common reusable configurations. |