Tests响应断言常用的几种方式
(1)response body:contains string (校验返回结果中是否包含某个字符串)
(2)response body:Is equal to string (校验返回结果中是否等于该字符串)使用少,token会变
(3)response body:Json value check (校验返回结果中某个字段是否等于某个值)
(4)response header:content-type header check (校验响应头是否包含某个值)
(5)response time is less than200ms (校验响应时间是否少于200ms)
(6)Status code:code is 200 (校验响应头是否包含某个值)
例:response body:contains string
response header:content-type header check
response time is less than200ms
Status code:code is 200
原文:https://www.cnblogs.com/u-damowang1/p/14802329.html