Postman:是否可以在集合运行器中自定义测试运行的顺序

编程入门 行业动态 更新时间:2024-10-24 10:19:43
本文介绍了Postman:是否可以在集合运行器中自定义测试运行的顺序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我的邮递员集合中有几个测试,但其中一些依赖于集合中的少数其他测试,因为后者设置了一些其他测试使用的 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?

推荐答案

根据每个文件夹和测试在 Postman 中的显示方式来执行.

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.

来源 - blog.getpostman/2016/03/23/conditional-workflows-in-postman/

更多推荐

Postman:是否可以在集合运行器中自定义测试运行的顺序

本文发布于:2023-10-29 10:17:50,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1539433.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:自定义   顺序   器中   测试   Postman

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!