如何在POSTMAN中的2个请求之间添加暂停 [英] How to add a pause between 2 requests in POSTMAN

查看:539
本文介绍了如何在POSTMAN中的2个请求之间添加暂停的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在POSTMAN中有一组请求。我想在2个请求之间添加一个暂停时间,但是我无法通过阅读他们的文档来做到这一点。知道吗?

I have a collection of requests in POSTMAN. I wanted to add a pause between 2 requests but I couldn't find a way to do so from reading their docs. Any idea?

UPDATE 我只想在一个请求之后而不是在集合中的每个请求之后都暂停一下。

UPDATE I only wanted to put a pause after one request instead of after every request in the collection.

推荐答案

如果有人仍在寻找这个问题-您可以在集合中的多个测试中的1个之前/之后添加延迟,可以使用:

In case someone is still looking for this - You can add delay after/before 1 of many test in a collection you can use:

setTimeout(function(){}, [number]);

其中数字是毫秒。如果将其添加到测试中,则将在发送请求后执行。如果是在请求前测试中添加的,它将在发送请求之前执行。

where 'number' is the milliseconds. If it's added at 'Tests' it will be executed after request is send. If it's added at 'pre-request tests' it will be executed before request is send.

这篇关于如何在POSTMAN中的2个请求之间添加暂停的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆