四:postman断言
列出最常用的三个断言:
tests["检查返回状态是否等于200"] = responseCode.code === 200;
var jsonData = JSON.parse(responseBody);
tests["检查返回的body里面isUserExists的值是否正确"] = jsonData.isUserExists === true;
tests["检查返回的body里面message的值是否正确"] = jsonData.message === "用户已存在";
tests["检查返回的body是否正确"] = responseBody === '{"isUserExists":true,"message":"用户已存在"}';