Postman----打开postman console控制台,查看接口测试打印log

时间:2023-03-08 22:33:08
Postman----打开postman console控制台,查看接口测试打印log

  经常在脚本中使用变量时,你可能需要看到变量获取到的值,你可以使用Postman Console去实现的。操作步骤:应用菜单-->View--->Show Postman Console,去打印变量的值。你可以在request的Pre-request Script 中填写console.log("domain)"当你发送请求时,此脚本将会执行,参数对应的值也会打印在Postman Console中。

1、查找Show Postman Console

Postman----打开postman console控制台,查看接口测试打印log

2、打开Postman Console的页面及提供的功能介绍。

Postman----打开postman console控制台,查看接口测试打印log

3、request的Pre-request Script 中填写console.log("domain)",填写后点击“send”运行

Postman----打开postman console控制台,查看接口测试打印log

4、查看运行当前接口在console中打印的日志

Postman----打开postman console控制台,查看接口测试打印log