SetNextrequest的Postman脚本不起作用
我正在使用 https://learlearning.postman.com/docs/docs,我正在使用示例/运行汇款/building-workflows/。
我的请求名为“ mytestrequest”。这是邮政请求。在请求的“测试”选项卡中,我有以下代码:
var i = 0;
while (i < 3) {
postman.setNextRequest("MyTestRequest");
console.log("Iteration:" + i);
i++;
}
当我单击“发送”按钮时,我应该看到四个帖子请求。第一篇文章甚至在执行上述代码之前就会发生。
但是,我只看到一个邮政请求。尽管我确实看到了三个控制台日志线,但是SetNextrequest似乎没有做任何事情。
我的代码与文档中的示例没有什么不同。想知道是否有人有任何见识。谢谢。
I am using a sample from https://learning.postman.com/docs/running-collections/building-workflows/.
My request is named "MyTestRequest." It is a POST request. In the "Tests" tab of the request, I have the following code:
var i = 0;
while (i < 3) {
postman.setNextRequest("MyTestRequest");
console.log("Iteration:" + i);
i++;
}
When I click on the Send button, I should be seeing four POST requests. The first POST happens even before the above code gets executed.
However, I see only one POST request. Although I do see three console log lines, it appears setNextRequest is not doing anything.
My code is no different than the example in the document. Wondering if anyone has any insight. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论