Closed MikhailStrokov closed 3 months ago
Update: I started creating ticket before https://github.com/usebruno/bruno/issues/2611 was created. I guess this one might be marked as duplicated because problem is the same. Maybe examples are useful for investigation
works in version 1.20.4
I have checked the following:
Describe the bug
CLI does not set variables. version -
1.20.3
run command -bru run --env test --output results.json
1 - Get any json response and set any field via vars. Here I set
data
via Vars anddataVar
via Script (screenshots below)Response:
2 - Send request using variable set via Vars (get-dynamic-data-from-var) :x: request from output file:
As you can see in url placeholder
{{data}}
is used instead of value3 - Send request using variable set via Scripts (get-dynamic-data-from-script) :x: request from output file:
As you can see in url placeholder
{{dataVar}}
is used instead of value4 - Send request using environment variable set via Scripts (get-dynamic-data-from-env) :white_check_mark: request from output file:
As you can see in url the value for
{{dataVarEnv}}
placeholder is used. So with environment variables it works. It might be a work around but if you set new value for same env key it will not override old value and the old value will be used. I'm not sure is it also a bug or not but there is no method to clear env variable (but exists for variable) so you have to set new key every time if you want to use WA.All bru files with cli output file are attached in zip archive
.bru file to reproduce the bug
demo.zip
Screenshots/Live demo link