Skip to content

Bruno CLI does not populate dynamic variables if they are in the URL #4504

Open
@leosuncin

Description

@leosuncin

I have checked the following:

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

This bug is:

  • making Bruno unusable for me
  • slowing me down but I'm able to continue working
  • annoying
  • this feature was working in a previous version but is broken in the current release.

Bruno version

2.1.0

Operating System

WSL Ubuntu 22.04.5 LTS

Describe the bug

I have a request that makes use of a dynamic variable to set a query parameter.

I tried the request using Bruno UI v2.1.0 and it works, but when I run the request with the CLI it fails to populate the variable.

.bru file to reproduce the bug

meta {
name: get /greet
type: http
seq: 1
}

get {
url: {{baseUrl}}/greet?name={{$randomFirstName}}
body: none
auth: none
}

params:query {
name: {{$randomFirstName}}
}

assert {
res.status: eq 200
}

tests {
test('include the name', function () {
expect(res.body)
.to.have.a.property('message')
.which.is.a('string')
.that.matches(/Hello, \w+!/);
});
}

Screenshots/Live demo link

Bruno client
Bruno UI

Bruno CLI
Bruno CLI

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions