Postman測試接口添加斷言

利用Postman測試接口:   測試接口: https://www.v2ex.com/api/topics/hot.json   添加斷言:   tests['狀態碼必須是200'] = responseCode.code ===200; var res = JSON.parse(responseBody); console.log(res.length); tests['必須返回9條數據'] 
相關文章
相關標籤/搜索