标签:postman cat test scripts response tool rom ica script
# pm脚本的教程 https://learning.getpostman.com/docs/postman/scripts/test_scripts/ # pm沙盒环境的一些api https://learning.getpostman.com/docs/postman/scripts/postman_sandbox_api_reference/ # 官方github https://github.com/chaijs/chai # 简书中文文档 https://www.jianshu.com/p/f200a75a15d2 # 官方文档 https://www.chaijs.com/api/
# qq邮箱设置白名单
# 可以呼出chrome dev tool,所以脚本中可以使用console.log ctrl + shift + i
判断数组长度
pm.test("返回数组长度必须大于0", function () { var jsonData = pm.response.json(); pm.expect(jsonData.length).to.be.gt(0); }); // OR pm.test("返回数组长度必须大于0", function () { var jsonData = pm.response.json(); pm.expect(jsonData).to.have.length.above(0); });
标签:postman cat test scripts response tool rom ica script
原文地址:https://www.cnblogs.com/CyLee/p/9749767.html