最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

workflow - How can I use bruno setNextRequest to redirect to a request in a different folder - Stack Overflow

programmeradmin4浏览0评论

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
Add a comment  | 

1 Answer 1

Reset to default 0

The 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

发布评论

评论列表(0)

  1. 暂无评论