📜  为 API 请求编写测试 - C 编程语言代码示例

📅  最后修改于: 2022-03-11 15:04:39.050000             🧑  作者: Mango

代码示例1
pm.test("Request is successful with a status code of 200", function () {
  pm.response.to.have.status(200);
});

pm.test("Check that it returns an array", function () {
  var jsonData = pm.response.json();
  pm.expect(jsonData).to.be.an("array");
});