You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've searched existing issues and found nothing related to my issue.
Describe the bug
Bruno version: 1.37.0
I use bru.setNextRequest() function in a request post response script to make a loop on this request until a condition is met. I also have a post response script at collection level to factorize common code to all my requests.
When running the collection, the script at collection level is executed multiple times for the same request when it is repeated by bru.setNextRequest()
Each time my request is run again by bru.setNextRequest(), the collection level script is executed N times where N is the number of repetitions.
meta {
name: check
type: http
seq: 2
}
get {
url: http://localhost:8000/check
body: none
auth: none
}
script:post-response {
console.log(`Request post response i=${bru.getVar("i")}`);
await bru.sleep(1000);
bru.setNextRequest("check");
}
Output when run in CLI:
Running Folder Recursively
check (404 NOT FOUND) - 53 ms
Request post response i=0
Collection post response i=0
check (404 NOT FOUND) - 7 ms
Request post response i=0
Collection post response i=0
Collection post response i=1
check (404 NOT FOUND) - 5 ms
Request post response i=0
Collection post response i=0
Collection post response i=1
Collection post response i=2
check (404 NOT FOUND) - 11 ms
Request post response i=0
Collection post response i=0
Collection post response i=1
Collection post response i=2
Collection post response i=3
Console message "Collection post response i=..." should not appear multiple times per request repetition.
Screenshots/Live demo link
Run with desktop app:
The text was updated successfully, but these errors were encountered:
I've the very same issue using setNextRequest() into a Post Response script of a request on any Collection where there is some Pre Request script, for any version of the Bruno CLI greater than1.35.0.
So it's OK downgrading to 1.35.0 as a temporary workaround: npm install -g @usebruno/[email protected]
The symptom is a message saying "Identifier yourVariableName has already been declared" where yourVariableName is the 1st variable declared into your Pre Request Script at collection level.
Could you please test this feature on the latest Bruno version and let us know if the issue still persists?
Download from here : https://www.usebruno.com/downloads
I have checked the following:
Describe the bug
Bruno version: 1.37.0
I use
bru.setNextRequest()
function in a request post response script to make a loop on this request until a condition is met. I also have a post response script at collection level to factorize common code to all my requests.When running the collection, the script at collection level is executed multiple times for the same request when it is repeated by
bru.setNextRequest()
Each time my request is run again by
bru.setNextRequest()
, the collection level script is executed N times where N is the number of repetitions..bru file to reproduce the bug
Small example of a request run in loop.
Output when run in CLI:
Console message "Collection post response i=..." should not appear multiple times per request repetition.
Screenshots/Live demo link
Run with desktop app:
The text was updated successfully, but these errors were encountered: