邮递员:是否可以在收集运行器中自定义测试运行的顺序 [英] Postman: Is it possible to customize the sequence of test runs in the collection runner

查看:70
本文介绍了邮递员:是否可以在收集运行器中自定义测试运行的顺序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

邮递员集合中有多个测试,但是其中一些测试依赖于集合中的其他几个测试,因为后者设置了一些其他测试使用的envt变量。我希望这些按顺序运行。我的收藏集中的测试分布在不同的文件夹中。是否有可能在类似结构的测试套件中定义这样的序列?

I have several tests in my postman collection but some of them are dependent on few others from within the collection as the latter set some envt variables that are used by other tests. I want these to run in a sequence. The tests in my collection are distributed across different folders. Is there a possibility to define such a sequence in a test suite like structure?

推荐答案

执行的过程取决于邮递员内部每个文件夹和测试的显示方式。

The execution happens according to how the folders and tests within each is displayed inside Postman.

在集合中,我通常根据执行顺序为文件夹编号,然后各个测试也可以以数字作为前缀,以便您控制执行。
请参阅所附的屏幕截图。

In a collection, I normally number my folders according to the execution order and then the individual tests can be prefixed with numbers as well, so that you control the execution. Refer to the attached screenshot.

此外,还有一个 postman.setNextRequest('Request-title'); 方法来自定义您要接下来执行的请求。

Also there's a postman.setNextRequest('Request-title'); method to customize which request you want to execute next.

源- http://blog.getpostman。 com / 2016/03/23 / conditional-workflows-postman /

这篇关于邮递员:是否可以在收集运行器中自定义测试运行的顺序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆