// 断言HTTP响应状态码为200
tests["Status code is 200"] = responseCode.code === 200;
// 断言响应内容中是否包含"code":9420
tests["Body matches string"] = responseBody.has('"code":9420');
//解析响应内容并判断code的值是:9420,msg的值是:恭喜qzcsbj,登录成功
var jsonData = JSON.parse(responseBody);
tests["response statusCode"] = jsonData.code === 9420;
tests["response message"] = jsonData.msg === '恭喜qzcsbj,登录成功';
// 断言响应时间是否小于200ms
tests["Response time is less than 200ms"] = responseTime < 200;
2.请求历史API 保存