I have requests grouped into folders for re-use and clarity. One folder for example handles checking status codes and looping until a response is received.
I am trying to use setNextRequest (I'm migrating from Postman) to manage the workflow progress.
I've tried using
- setNextRequest("checkResponse")
- setNextRequest("folder/checkResponse")
- setNextRequest("folder/checkResponse.bru")
When executing the request through the runner it simply completes and doesn't proceed to the checkResponse
I have requests grouped into folders for re-use and clarity. One folder for example handles checking status codes and looping until a response is received.
I am trying to use setNextRequest (I'm migrating from Postman) to manage the workflow progress.
I've tried using
- setNextRequest("checkResponse")
- setNextRequest("folder/checkResponse")
- setNextRequest("folder/checkResponse.bru")
When executing the request through the runner it simply completes and doesn't proceed to the checkResponse
Share Improve this question asked Mar 10 at 17:35 SRLSRL 11 1- Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Bot Commented Mar 12 at 19:40
1 Answer
Reset to default 0The setNextRequest
method does not execute a request, it only sets which request has to be executed next when a collection is run. When executing a single request containing setNextRequest
in the post-request or test script, the request referred to will not be run.
What you probably need is the runRequest
method, which will invoke the referred to request.
const response = await bru.runRequest("folder/checkResponse");
Documentation can be found here: https://docs.usebruno/testing/script/javascript-reference