Postman+Postman interceptor的安装和使用-解决把chrome浏览器登录状态同步到postman进行有依赖的接口测试
Postman+Postman interceptor的安装和使用-解决把chrome浏览器登录状态同步到postman进行有依赖的接口测试 问题引入:做接口测试时,有依赖关系的接口往往不好测试(比如登录状态信息),需要不断抓取cookie中的token等值传入去做身份验证。解决这个问题的办法就是引入interceptor插件,自动把cookie中的登录信息带入到postman中。 1.postman安装: chrome://extensions/打开,把下载好的postman插件拖到里面就可以了。 2.Postman interceptor安装: chrome://extensions/打开,把下载好的Postman interceptor插件拖到里面就可以了。 3.Postman interceptor安装完成chrome浏览器右上角会显示一个图标,点击将其打开。 4.打开postman,打开interceptor插件 5.chrome浏览器中登录测试的账号,再用postman去测试依赖登录状态的接口就不需要验证了,因为interceptor已经自动把浏览器中的登录状态同步到postman啦。 过程中遇到的问题: 1.先安装了Postman interceptor,再安装的postman,结果发送请求时一直处于loading状态。 解决办法:把两个插件卸载