Postman: Is it possible to customize the sequence of test runs in the collection runner

后端 未结 2 1360
野的像风
野的像风 2021-02-13 16:46

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 othe

2条回答
  •  不思量自难忘°
    2021-02-13 17:27

    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.

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

    Source - http://blog.getpostman.com/2016/03/23/conditional-workflows-in-postman/

提交回复
热议问题