转自:https://www.freesion.com/article/3732925227/
1.定义全局变量
-
postman.setGlobalVariable("startTime",Date.parse(new Date("2020/06/12 00:00:10")));
-
postman.setGlobalVariable("endTime",Date.parse(new Date("2020/06/12 23:59:10")));
2.json字符串中引用
-
"startTime": {{startTime}},
-
"endTime": {{endTime}},
3.调用接口