接口文档:https://www.v2ex.com/p/7v9TEc53
url:https://www.v2ex.com/api/topics/hot.json
代码:
tests["状态码必须是200"] = responseCode.code === 200;
var res = JSON.parse(responBody);
console.log(res.length);
tests["必须返回10条数据"] = res.length === 10;
接口文档:https://www.v2ex.com/p/7v9TEc53
url:https://www.v2ex.com/api/topics/hot.json
代码:
tests["状态码必须是200"] = responseCode.code === 200;
var res = JSON.parse(responBody);
console.log(res.length);
tests["必须返回10条数据"] = res.length === 10;