Skip to content

fix: update global env in collection runner #4135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

pooja-bruno
Copy link
Collaborator

@pooja-bruno pooja-bruno commented Feb 28, 2025

Description

Addressing issue #4100

This PR fixes an issue where global environment variables set using bru.setGlobalEnvVar() in test scripts were not being saved correctly during a collection run.

What was the issue?

  • When running multiple requests in a collection, if a test script updated a global environment variable, the next request didn't see the updated value.
  • This issue only happened with test scripts. Pre-request and post-response scripts were already working fine.

Contribution Checklist:

  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the [contribution guidelines]
  • Create an issue and link to the pull request.
Screen.Recording.2025-02-28.at.11.45.02.AM.mov

@naman-bruno
Copy link
Collaborator

LGTM

@helloanoop helloanoop merged commit 74bbfce into usebruno:main Apr 10, 2025
2 checks passed
@helloanoop
Copy link
Contributor

Merged, Thanks @pooja-bruno !

Thanks @naman-bruno and @lohit-bruno for the review.

pooja-bruno added a commit to pooja-bruno/bruno that referenced this pull request May 7, 2025
* fix: update global env in collection runner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants