Postman响应断言
生活随笔
收集整理的這篇文章主要介紹了
Postman响应断言
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
Tests響應(yīng)斷言的幾種方式
(1)response body:contains string (校驗(yàn)返回結(jié)果中是否包含某個(gè)字符串)
(2)response body:Is equal to string (校驗(yàn)返回結(jié)果中是否等于該字符串)使用少,token會(huì)變
(3)response body:Json value check (校驗(yàn)返回結(jié)果中某個(gè)字段是否等于某個(gè)值)
(4)response header:content-type header check (校驗(yàn)響應(yīng)頭是否包含某個(gè)值)
(5)response time is less than200ms (校驗(yàn)響應(yīng)時(shí)間是否少于200ms)
(6)Status code:code is 200 (校驗(yàn)響應(yīng)頭是否包含某個(gè)值)
1)response body:contains string
response header:content-type header check
response time is less than 200ms
Status code:code is 200
總結(jié)
以上是生活随笔為你收集整理的Postman响应断言的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Postman获取App端接口
- 下一篇: Postman工具之参数化