【发布时间】:2021-06-28 01:20:59
【问题描述】:
我注意到在 Newman 中运行时不会反映 Postman 中测试的任何更改。 例子: 在 Postman 中,我将以下文本从 '200ms' 更改为 '100ms'
console.log("Hello World!");
pm.test("C6 Verify response time is less than 100ms", function () {
pm.expect(pm.response.responseTime).to.be.below(100);
但在纽曼,它仍然是 '200ms'
GET https://reqres.in/api/users?page=2 [200 OK, 2.06KB, 172ms]
┌
│ 'Hello World!'
└
√ C6 Verify response time is less than 200ms
有没有办法清除缓存之类的? 以便 Newman 从 Postman 获得最新的测试更改?
【问题讨论】:
-
在使用 newman 重新运行之前,您是否保存并导出了更新的集合?
-
啊……我能做到。一直以来,我一直在使用 url 直接访问集合。但这是解决这个问题的唯一方法吗?导出成json?
-
@Timothyyeoh 确保它与云同步
-
我忘了提到我正在从 GitLab 运行 newman 命令。我希望 newman 命令通过 url 直接引用集合。
-
@PDHide,刚刚在下面看到你的答案,将探索它。