【发布时间】:2018-08-21 12:43:52
【问题描述】:
我想检查具体响应标头(“位置”)中的值作为 Postman 中的测试结果。 在邮递员的文档中,我找到了如何使用
检查标题是否存在的示例pm.test("Content-Type is present", function () {
pm.response.to.have.header("Content-Type");
});
但我正在寻找类似的东西
pm.test("Location value is correct", function () {
CODE HERE THAT CHECKS "Location" HEADER EQUALS TO SOMETHING;
});
【问题讨论】:
标签: testing automated-tests postman