bruno icon indicating copy to clipboard operation
bruno copied to clipboard

setNextRequest by id

Open TheBatman09 opened this issue 1 year ago • 1 comments

I have checked the following:

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

Describe the feature you want to add

Why

Currently in the script tab we can set the next request to be run with setNextRequest(name) but it's far from ideal as several requests in the run may have the same name so it can easily break the suite because of typo/request renaming.

How

We could just allow users to set next request to run based on uid instead of request name.

Mockups or Images of the feature

I don't think it applies here

TheBatman09 avatar Oct 31 '24 15:10 TheBatman09

I'm having the same issue with the setNextRequest, in a single collection I have several requests with the same name but in different folders. I can't use setNextRequest without renaming my requests with unique names. I would also like to use uids (it's something that can be done with postman where you can even loop on current request by running pm.execution.setNextRequest(pm.info.requestId)). But using a request path name instead of a request name similar to bru.runRequest(path) would be a great start.

julesfrn avatar Apr 22 '25 11:04 julesfrn

In my case I use bru.setNextRequest() to loop a request 50 times and then continue with the next request in the collection. When I run the folder on its own, it works fine: after 50 iterations the runner moves on to the following request.

However, when I run the whole collection, the behavior changes. After the 50th run the setNextRequest() does not resolve properly, and instead the runner jumps back to the beginning of the collection. This only happens in the collection context, not when running the folder directly.

It seems that resolving the next request by name becomes unreliable outside the folder scope. Having a way to target the next request by a unique ID (instead of the request name) would solve this and make the behavior consistent across folder and collection runs.

butzlukas avatar Sep 09 '25 13:09 butzlukas

allowing me to use the full folder path or ID will solve my problem, please please please implement this!

TheMuffinPan avatar Nov 07 '25 19:11 TheMuffinPan