整理一下Postman -> Tests 标签下的预设断言:
1. Get an environment variable
作用:获取环境变量
2. Get a global variable
作用:获取全局变量
3. Get a variable
作用:获取变量
4. Set an environment variable
作用:设置环境变量
5. Set a global variable
作用:设置全局变量
6. Clear an environment variable
作用:清除环境变量
7. Clear a global variable
作用:清除全局变量
8. Send a request
作用:发送请求
9. Status code: Code is 200
作用:判断状态码是否为200
10. Response body: Contains string
作用:判断响应正文中是否包含某些字符串
11. Response body: JSON value check
作用:响应正文中Json值检查
12. Response body: Is equal to a string
作用:判断响应正文中是否等于某些字符串
13. Response headers: Content-Type header check
作用:
14. Response time is less than 200ms
作用:判断响应时间是否小于200ms
15. Status code: Successful POST request
作用:
16. Status code: Code name has string
作用:
17. Response body: Convert XML body to a JSON Object
作用:响应正文将XML主体转换为JSON对象
18. Use Tiny Validator for JSON data
作用: