转自:https://www.freesion.com/article/3732925227/

1.定义全局变量

  1.  
    postman.setGlobalVariable("startTime",Date.parse(new Date("2020/06/12 00:00:10")));
  2.  
    postman.setGlobalVariable("endTime",Date.parse(new Date("2020/06/12 23:59:10")));

2.json字符串中引用

  1.  
    "startTime": {{startTime}},
  2.  
    "endTime": {{endTime}},

 3.调用接口

 

 
 
posted on 2021-06-29 17:16  Sharpest  阅读(7538)  评论(0编辑  收藏  举报