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

后端 未结 2 1354
野的像风
野的像风 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/

    0 讨论(0)
  • 2021-02-13 17:31

    You can drag/drop requests in postman in order that you want to be executed in Collection Runner

    0 讨论(0)
提交回复
热议问题