Skip to content
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

Please implement bru.setCollectionVar #3794

Open
1 task done
rvaccarim opened this issue Jan 14, 2025 · 2 comments
Open
1 task done

Please implement bru.setCollectionVar #3794

rvaccarim opened this issue Jan 14, 2025 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@rvaccarim
Copy link

I have checked the following:

  • I've searched existing issues and found nothing related to my issue.

Describe the feature you want to add

Currently there is a bru.getCollectionVar implemented. I would also like to have a bru.setCollectionVar in order to modify the variable in a post execution script.

Mockups or Images of the feature

The syntax would be like this:

bru.setCollectionVar("token", res.body.token);

@rvaccarim rvaccarim added the enhancement New feature or request label Jan 14, 2025
@Its-treason
Copy link
Member

Its-treason commented Jan 14, 2025

Doesn't bru.setEnvVar/bru.setVar solve your use case? Collection variables are meant to be immutable.

@rvaccarim
Copy link
Author

Yes, I was actually able to solve my case using setVar.

However, from a consistency point of view, I think that Collection and Folder variables could have setters just like Environment variables. In any case, if there is a strong technical or philosophical reason for considering them immutable maybe it could be a good idea to include that in the documentation. It would also help clarify which kind of values are suitable for each variable type.

@ganesh-bruno ganesh-bruno added the documentation Improvements or additions to documentation label Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants