【问题标题】:Postman REST API automation without duplicating testsPostman REST API 自动化,无需重复测试
【发布时间】:2017-10-25 22:25:36
【问题描述】:

我有 8 个请求,我想在运行其他每个请求之前运行前三个。例如

1st collection: 1 -> 2 -> 3 -> 4
2nd collection: 1 -> 2 -> 3 -> 5
3rd collection: 1 -> 2 -> 3 -> 6
4th collection: 1 -> 2 -> 3 -> 7
5th collection: 1 -> 2 -> 3 -> 8

目前我已经为其他每个请求复制了前三个请求,但这使得更改它们很耗时。

有没有办法使用 Postman Runner 来执行上面的不重复?

【问题讨论】:

    标签: postman


    【解决方案1】:

    您可能有一个包含所有测试的集合并使用 setNextRequest 功能(请参阅http://blog.getpostman.com/2016/03/23/conditional-workflows-in-postman/)。有了这个,我想你可以设法在第一次迭代时选择请求 4,在下一次迭代时选择请求 5,等等。用递增的全局变量调节 setNextRequest。

    亚历山大

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-07-09
      • 2018-10-02
      • 1970-01-01
      • 1970-01-01
      • 2019-05-25
      • 1970-01-01
      • 2016-02-10
      相关资源
      最近更新 更多