Skip to content

postman.class.test

设置 Postman 导出时类级别的测试脚本。

用法

properties
postman.class.test=groovy:'''
pm.test("Status code is 200", function () {
    pm.response.to.have.status(200);
});
'''

导出到 Postman 时,此脚本将应用于该类中的所有 API 方法。

另见

基于 Apache-2.0 许可发布